diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-03-23 14:47:05 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-03-23 15:17:47 +0100 |
| commit | b3a00b4123c85d047b5ab6b89d4d500cc2b92ba6 (patch) | |
| tree | b77fce1d0d672ef9888136229e289b314fe38066 /src_testbed | |
| parent | 3d112287b9fd5aa3ddf8c17bc1e6065fa721a9ce (diff) | |
| download | rapier-b3a00b4123c85d047b5ab6b89d4d500cc2b92ba6.tar.gz rapier-b3a00b4123c85d047b5ab6b89d4d500cc2b92ba6.tar.bz2 rapier-b3a00b4123c85d047b5ab6b89d4d500cc2b92ba6.zip | |
feat: add the DefaultBroadPhase type alias
Diffstat (limited to 'src_testbed')
| -rw-r--r-- | src_testbed/harness/mod.rs | 4 | ||||
| -rw-r--r-- | src_testbed/physics/mod.rs | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src_testbed/harness/mod.rs b/src_testbed/harness/mod.rs index 458f02f..9c41472 100644 --- a/src_testbed/harness/mod.rs +++ b/src_testbed/harness/mod.rs @@ -9,7 +9,7 @@ use rapier::dynamics::{ CCDSolver, ImpulseJointSet, IntegrationParameters, IslandManager, MultibodyJointSet, RigidBodySet, }; -use rapier::geometry::{BroadPhaseMultiSap, ColliderSet, NarrowPhase}; +use rapier::geometry::{ColliderSet, DefaultBroadPhase, NarrowPhase}; use rapier::math::{Real, Vector}; use rapier::pipeline::{ChannelEventCollector, PhysicsHooks, PhysicsPipeline, QueryPipeline}; @@ -179,7 +179,7 @@ impl Harness { self.physics.hooks = Box::new(hooks); self.physics.islands = IslandManager::new(); - self.physics.broad_phase = BroadPhaseMultiSap::new(); + self.physics.broad_phase = DefaultBroadPhase::new(); self.physics.narrow_phase = NarrowPhase::new(); self.state.timestep_id = 0; self.state.time = 0.0; diff --git a/src_testbed/physics/mod.rs b/src_testbed/physics/mod.rs index 38c9da0..3c69f6e 100644 --- a/src_testbed/physics/mod.rs +++ b/src_testbed/physics/mod.rs @@ -4,7 +4,7 @@ use rapier::dynamics::{ RigidBodySet, }; use rapier::geometry::{ - BroadPhaseMultiSap, ColliderSet, CollisionEvent, ContactForceEvent, NarrowPhase, + ColliderSet, CollisionEvent, ContactForceEvent, DefaultBroadPhase, NarrowPhase, }; use rapier::math::{Real, Vector}; use rapier::pipeline::{PhysicsHooks, PhysicsPipeline, QueryPipeline}; @@ -22,7 +22,7 @@ pub struct PhysicsSnapshot { pub struct DeserializedPhysicsSnapshot { pub timestep_id: usize, - pub broad_phase: BroadPhaseMultiSap, + pub broad_phase: DefaultBroadPhase, pub narrow_phase: NarrowPhase, pub island_manager: IslandManager, pub bodies: RigidBodySet, @@ -34,7 +34,7 @@ pub struct DeserializedPhysicsSnapshot { impl PhysicsSnapshot { pub fn new( timestep_id: usize, - broad_phase: &BroadPhaseMultiSap, + broad_phase: &DefaultBroadPhase, narrow_phase: &NarrowPhase, island_manager: &IslandManager, bodies: &RigidBodySet, @@ -88,7 +88,7 @@ impl PhysicsSnapshot { pub struct PhysicsState { pub islands: IslandManager, - pub broad_phase: BroadPhaseMultiSap, + pub broad_phase: DefaultBroadPhase, pub narrow_phase: NarrowPhase, pub bodies: RigidBodySet, pub colliders: ColliderSet, @@ -112,7 +112,7 @@ impl PhysicsState { pub fn new() -> Self { Self { islands: IslandManager::new(), - broad_phase: BroadPhaseMultiSap::new(), + broad_phase: DefaultBroadPhase::new(), narrow_phase: NarrowPhase::new(), bodies: RigidBodySet::new(), colliders: ColliderSet::new(), |
