aboutsummaryrefslogtreecommitdiff
path: root/src_testbed
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-03-23 13:26:53 +0100
committerSébastien Crozet <sebastien@crozet.re>2024-03-23 15:17:47 +0100
commitcfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc (patch)
tree3c5f8a0e28e1aed0870e4a33fbcb7814920692ab /src_testbed
parentcd9fb8342d115bad557ca05aa16fb961fe28b1b5 (diff)
downloadrapier-cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc.tar.gz
rapier-cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc.tar.bz2
rapier-cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc.zip
feat!: rename BroadPhase to BroadPhaseMultiSap
Diffstat (limited to 'src_testbed')
-rw-r--r--src_testbed/harness/mod.rs4
-rw-r--r--src_testbed/physics/mod.rs12
2 files changed, 9 insertions, 7 deletions
diff --git a/src_testbed/harness/mod.rs b/src_testbed/harness/mod.rs
index e27a03a..458f02f 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::{BroadPhase, ColliderSet, NarrowPhase};
+use rapier::geometry::{BroadPhaseMultiSap, ColliderSet, 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 = BroadPhase::new();
+ self.physics.broad_phase = BroadPhaseMultiSap::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 c3b750f..38c9da0 100644
--- a/src_testbed/physics/mod.rs
+++ b/src_testbed/physics/mod.rs
@@ -3,7 +3,9 @@ use rapier::dynamics::{
CCDSolver, ImpulseJointSet, IntegrationParameters, IslandManager, MultibodyJointSet,
RigidBodySet,
};
-use rapier::geometry::{BroadPhase, ColliderSet, CollisionEvent, ContactForceEvent, NarrowPhase};
+use rapier::geometry::{
+ BroadPhaseMultiSap, ColliderSet, CollisionEvent, ContactForceEvent, NarrowPhase,
+};
use rapier::math::{Real, Vector};
use rapier::pipeline::{PhysicsHooks, PhysicsPipeline, QueryPipeline};
@@ -20,7 +22,7 @@ pub struct PhysicsSnapshot {
pub struct DeserializedPhysicsSnapshot {
pub timestep_id: usize,
- pub broad_phase: BroadPhase,
+ pub broad_phase: BroadPhaseMultiSap,
pub narrow_phase: NarrowPhase,
pub island_manager: IslandManager,
pub bodies: RigidBodySet,
@@ -32,7 +34,7 @@ pub struct DeserializedPhysicsSnapshot {
impl PhysicsSnapshot {
pub fn new(
timestep_id: usize,
- broad_phase: &BroadPhase,
+ broad_phase: &BroadPhaseMultiSap,
narrow_phase: &NarrowPhase,
island_manager: &IslandManager,
bodies: &RigidBodySet,
@@ -86,7 +88,7 @@ impl PhysicsSnapshot {
pub struct PhysicsState {
pub islands: IslandManager,
- pub broad_phase: BroadPhase,
+ pub broad_phase: BroadPhaseMultiSap,
pub narrow_phase: NarrowPhase,
pub bodies: RigidBodySet,
pub colliders: ColliderSet,
@@ -110,7 +112,7 @@ impl PhysicsState {
pub fn new() -> Self {
Self {
islands: IslandManager::new(),
- broad_phase: BroadPhase::new(),
+ broad_phase: BroadPhaseMultiSap::new(),
narrow_phase: NarrowPhase::new(),
bodies: RigidBodySet::new(),
colliders: ColliderSet::new(),