feat!: rename BroadPhase to BroadPhaseMultiSap

This commit is contained in:
Sébastien Crozet
2024-03-23 13:26:53 +01:00
committed by Sébastien Crozet
parent cd9fb8342d
commit cfb2c2c93e
11 changed files with 41 additions and 38 deletions

View File

@@ -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(),