fixed rapier.rs

This commit is contained in:
2026-05-29 19:19:16 +03:00
parent 363bd9001d
commit 4811ad0820
14 changed files with 16 additions and 17 deletions

2
external/SDL vendored

Submodule external/SPIRV-Tools deleted from 0436c4b055

2
external/slang vendored

2
external/stb vendored

2
external/volk vendored

2
external/xtool vendored

View File

@@ -10,5 +10,4 @@ path = "physics.rs"
[dependencies] [dependencies]
libc = "0.2.182" libc = "0.2.182"
parry3d = "*"
rapier3d = { version = "*", features = [ "simd-stable", "parallel" ] } rapier3d = { version = "*", features = [ "simd-stable", "parallel" ] }

View File

@@ -15,9 +15,10 @@ macro_rules! V_malloc {
use std::{default, ops::Index, ptr::{self, null, null_mut}, slice::from_raw_parts, sync::Arc}; use std::{default, ops::Index, ptr::{self, null, null_mut}, slice::from_raw_parts, sync::Arc};
use parry3d::{glamx::vec3, shape::{Shape, ShapeType, SharedShape}}; use rapier3d::glamx::*;
use parry3d::{glamx::{Pose3A}, query::ShapeCastOptions}; use rapier3d::parry::query::ShapeCastOptions;
use rapier3d::{geometry::Ball, na::{UnitQuaternion, Vector4, coordinates::XYZ}}; use rapier3d::geometry::*;
use rapier3d::na::*;
use rapier3d::prelude::*; use rapier3d::prelude::*;
use libc::{malloc, free}; use libc::{malloc, free};
use std::ffi::c_void; use std::ffi::c_void;
@@ -153,7 +154,7 @@ pub unsafe extern "C" fn CRapierPhysicsBody_SetRotation( this: *mut RapierPhysic
{ {
let world: &mut RapierWorld_t = &mut *(*this).m_pWorld; let world: &mut RapierWorld_t = &mut *(*this).m_pWorld;
world.m_rigidBodies[(*this).m_hRigidBodyHandle] world.m_rigidBodies[(*this).m_hRigidBodyHandle]
.set_rotation(parry3d::glamx::Quat::from_xyzw(fX, fY, fZ, fW), true); .set_rotation(glamx::Quat::from_xyzw(fX, fY, fZ, fW), true);
} }