diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-03-23 13:26:53 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-03-23 15:17:47 +0100 |
| commit | cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc (patch) | |
| tree | 3c5f8a0e28e1aed0870e4a33fbcb7814920692ab /src/geometry/broad_phase_multi_sap | |
| parent | cd9fb8342d115bad557ca05aa16fb961fe28b1b5 (diff) | |
| download | rapier-cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc.tar.gz rapier-cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc.tar.bz2 rapier-cfb2c2c93e39e1f59557c4f32fde4a68dc4cd6fc.zip | |
feat!: rename BroadPhase to BroadPhaseMultiSap
Diffstat (limited to 'src/geometry/broad_phase_multi_sap')
| -rw-r--r-- | src/geometry/broad_phase_multi_sap/broad_phase_multi_sap.rs (renamed from src/geometry/broad_phase_multi_sap/broad_phase.rs) | 14 | ||||
| -rw-r--r-- | src/geometry/broad_phase_multi_sap/mod.rs | 4 | ||||
| -rw-r--r-- | src/geometry/broad_phase_multi_sap/sap_layer.rs | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/geometry/broad_phase_multi_sap/broad_phase.rs b/src/geometry/broad_phase_multi_sap/broad_phase_multi_sap.rs index 9e1bc06..24bc72d 100644 --- a/src/geometry/broad_phase_multi_sap/broad_phase.rs +++ b/src/geometry/broad_phase_multi_sap/broad_phase_multi_sap.rs @@ -74,7 +74,7 @@ use parry::utils::hashmap::HashMap; /// broad-phase, as well as the Aabbs of all the regions part of this broad-phase. #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[derive(Clone)] -pub struct BroadPhase { +pub struct BroadPhaseMultiSap { proxies: SAPProxies, layers: Vec<SAPLayer>, smallest_layer: u8, @@ -114,16 +114,16 @@ pub struct BroadPhase { reporting: HashMap<(u32, u32), bool>, // Workspace } -impl Default for BroadPhase { +impl Default for BroadPhaseMultiSap { fn default() -> Self { Self::new() } } -impl BroadPhase { +impl BroadPhaseMultiSap { /// Create a new empty broad-phase. pub fn new() -> Self { - BroadPhase { + BroadPhaseMultiSap { proxies: SAPProxies::new(), layers: Vec::new(), smallest_layer: 0, @@ -138,7 +138,7 @@ impl BroadPhase { /// /// For each colliders marked as removed, we make their containing layer mark /// its proxy as pre-deleted. The actual proxy removal will happen at the end - /// of the `BroadPhase::update`. + /// of the `BroadPhaseMultiSap::update`. fn handle_removed_colliders(&mut self, removed_colliders: &[ColliderHandle]) { // For each removed collider, remove the corresponding proxy. for removed in removed_colliders { @@ -623,11 +623,11 @@ mod test { use crate::dynamics::{ ImpulseJointSet, IslandManager, MultibodyJointSet, RigidBodyBuilder, RigidBodySet, }; - use crate::geometry::{BroadPhase, ColliderBuilder, ColliderSet}; + use crate::geometry::{BroadPhaseMultiSap, ColliderBuilder, ColliderSet}; #[test] fn test_add_update_remove() { - let mut broad_phase = BroadPhase::new(); + let mut broad_phase = BroadPhaseMultiSap::new(); let mut bodies = RigidBodySet::new(); let mut colliders = ColliderSet::new(); let mut impulse_joints = ImpulseJointSet::new(); diff --git a/src/geometry/broad_phase_multi_sap/mod.rs b/src/geometry/broad_phase_multi_sap/mod.rs index 0f85e96..a1951c7 100644 --- a/src/geometry/broad_phase_multi_sap/mod.rs +++ b/src/geometry/broad_phase_multi_sap/mod.rs @@ -1,4 +1,4 @@ -pub use self::broad_phase::BroadPhase; +pub use self::broad_phase_multi_sap::BroadPhaseMultiSap; pub use self::broad_phase_pair_event::{BroadPhasePairEvent, ColliderPair}; pub use self::sap_proxy::SAPProxyIndex; @@ -9,7 +9,7 @@ use self::sap_proxy::*; use self::sap_region::*; use self::sap_utils::*; -mod broad_phase; +mod broad_phase_multi_sap; mod broad_phase_pair_event; mod sap_axis; mod sap_endpoint; diff --git a/src/geometry/broad_phase_multi_sap/sap_layer.rs b/src/geometry/broad_phase_multi_sap/sap_layer.rs index 2266d56..12dc7f7 100644 --- a/src/geometry/broad_phase_multi_sap/sap_layer.rs +++ b/src/geometry/broad_phase_multi_sap/sap_layer.rs @@ -71,7 +71,7 @@ impl SAPLayer { /// /// This method must be called in a bottom-up loop, propagating new regions from the /// smallest layer, up to the largest layer. That loop is done by the Phase 3 of the - /// BroadPhase::update. + /// BroadPhaseMultiSap::update. pub fn propagate_created_regions( &mut self, larger_layer: &mut Self, @@ -182,7 +182,7 @@ impl SAPLayer { /// If the region with the given region key does not exist yet, it is created. /// When a region is created, it creates a new proxy for that region, and its /// proxy ID is added to `self.created_region` so it can be propagated during - /// the Phase 3 of `BroadPhase::update`. + /// the Phase 3 of `BroadPhaseMultiSap::update`. /// /// This returns the proxy ID of the already existing region if it existed, or /// of the new region if it did not exist and has been created by this method. |
