diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-03-17 21:20:18 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-03-17 21:24:28 +0100 |
| commit | ecd308338b189ab569816a38a03e3f8b89669dde (patch) | |
| tree | fa612abff2f23ea6a5ff04c64c07296d9fb065c8 /examples3d | |
| parent | da92e5c2837b27433286cf0dd9d887fd44dda254 (diff) | |
| download | rapier-bevy-glam.tar.gz rapier-bevy-glam.tar.bz2 rapier-bevy-glam.zip | |
feat: start experimenting with a glam/bevy versionbevy-glam
Diffstat (limited to 'examples3d')
| -rw-r--r-- | examples3d/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples3d/ccd3.rs | 4 | ||||
| -rw-r--r-- | examples3d/convex_polyhedron3.rs | 2 | ||||
| -rw-r--r-- | examples3d/debug_deserialize3.rs | 2 | ||||
| -rw-r--r-- | examples3d/debug_prismatic3.rs | 2 | ||||
| -rw-r--r-- | examples3d/joints3.rs | 18 | ||||
| -rw-r--r-- | examples3d/keva3.rs | 4 |
7 files changed, 18 insertions, 16 deletions
diff --git a/examples3d/Cargo.toml b/examples3d/Cargo.toml index 1e44b3d..1edf6fe 100644 --- a/examples3d/Cargo.toml +++ b/examples3d/Cargo.toml @@ -11,6 +11,8 @@ simd-stable = [ "rapier3d/simd-stable" ] simd-nightly = [ "rapier3d/simd-nightly" ] other-backends = [ "rapier_testbed3d/other-backends" ] enhanced-determinism = [ "rapier3d/enhanced-determinism" ] +linalg-nalgebra = [ "rapier_testbed3d/linalg-nalgebra" ] +linalg-glam = [ "rapier_testbed3d/linalg-glam" ] [dependencies] rand = "0.8" diff --git a/examples3d/ccd3.rs b/examples3d/ccd3.rs index c1a5176..8a3ea7c 100644 --- a/examples3d/ccd3.rs +++ b/examples3d/ccd3.rs @@ -5,9 +5,9 @@ fn create_wall( testbed: &mut Testbed, bodies: &mut RigidBodySet, colliders: &mut ColliderSet, - offset: Vector<f32>, + offset: Vector, stack_height: usize, - half_extents: Vector<f32>, + half_extents: Vector, ) { let shift = half_extents * 2.0; let mut k = 0; diff --git a/examples3d/convex_polyhedron3.rs b/examples3d/convex_polyhedron3.rs index 980720a..986dea9 100644 --- a/examples3d/convex_polyhedron3.rs +++ b/examples3d/convex_polyhedron3.rs @@ -47,7 +47,7 @@ pub fn init_world(testbed: &mut Testbed) { let mut points = Vec::new(); for _ in 0..10 { - let pt: Point<f32> = distribution.sample(&mut rng); + let pt: Point = distribution.sample(&mut rng); points.push(pt * scale); } diff --git a/examples3d/debug_deserialize3.rs b/examples3d/debug_deserialize3.rs index b8b79fb..00eedf4 100644 --- a/examples3d/debug_deserialize3.rs +++ b/examples3d/debug_deserialize3.rs @@ -3,7 +3,7 @@ use rapier_testbed3d::Testbed; #[derive(serde::Deserialize)] struct PhysicsState { - pub gravity: Vector<f32>, + pub gravity: Vector, pub integration_parameters: IntegrationParameters, pub islands: IslandManager, pub broad_phase: BroadPhase, diff --git a/examples3d/debug_prismatic3.rs b/examples3d/debug_prismatic3.rs index 776c50c..f67c43e 100644 --- a/examples3d/debug_prismatic3.rs +++ b/examples3d/debug_prismatic3.rs @@ -5,7 +5,7 @@ fn prismatic_repro( bodies: &mut RigidBodySet, colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, - box_center: Point<f32>, + box_center: Point, ) { let box_rb = bodies.insert(RigidBodyBuilder::dynamic().translation(vector![ box_center.x, diff --git a/examples3d/joints3.rs b/examples3d/joints3.rs index 73f48ae..2e0ad25 100644 --- a/examples3d/joints3.rs +++ b/examples3d/joints3.rs @@ -6,7 +6,7 @@ fn create_coupled_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, use_articulations: bool, ) { let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin.coords)); @@ -34,7 +34,7 @@ fn create_prismatic_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, num: usize, use_articulations: bool, ) { @@ -78,7 +78,7 @@ fn create_actuated_prismatic_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, num: usize, use_articulations: bool, ) { @@ -143,7 +143,7 @@ fn create_revolute_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, num: usize, use_articulations: bool, ) { @@ -204,7 +204,7 @@ fn create_revolute_joints_with_limits( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, use_articulations: bool, ) { let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin.coords)); @@ -275,7 +275,7 @@ fn create_fixed_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, num: usize, use_articulations: bool, ) { @@ -397,7 +397,7 @@ fn create_spherical_joints_with_limits( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, use_articulations: bool, ) { let shift = vector![0.0, 0.0, 3.0]; @@ -438,7 +438,7 @@ fn create_actuated_revolute_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, num: usize, use_articulations: bool, ) { @@ -507,7 +507,7 @@ fn create_actuated_spherical_joints( colliders: &mut ColliderSet, impulse_joints: &mut ImpulseJointSet, multibody_joints: &mut MultibodyJointSet, - origin: Point<f32>, + origin: Point, num: usize, use_articulations: bool, ) { diff --git a/examples3d/keva3.rs b/examples3d/keva3.rs index 4f5cd54..fb2c6b2 100644 --- a/examples3d/keva3.rs +++ b/examples3d/keva3.rs @@ -5,8 +5,8 @@ pub fn build_block( testbed: &mut Testbed, bodies: &mut RigidBodySet, colliders: &mut ColliderSet, - half_extents: Vector<f32>, - shift: Vector<f32>, + half_extents: Vector, + shift: Vector, (mut numx, numy, mut numz): (usize, usize, usize), ) { let dimensions = [half_extents.xyz(), half_extents.zyx()]; |
