@@ -3,10 +3,10 @@ use std::collections::HashMap;
3
3
use std:: sync:: RwLock ;
4
4
5
5
use rapier:: prelude:: {
6
- CCDSolver , ColliderHandle , ColliderSet , EventHandler , FeatureId , ImpulseJointHandle ,
7
- ImpulseJointSet , IntegrationParameters , IslandManager , MultibodyJointHandle , MultibodyJointSet ,
8
- NarrowPhase , PhysicsHooks , PhysicsPipeline , QueryFilter as RapierQueryFilter , QueryPipeline ,
9
- Ray , Real , RigidBodyHandle , RigidBodySet ,
6
+ BroadPhase , CCDSolver , ColliderHandle , ColliderSet , EventHandler , FeatureId ,
7
+ ImpulseJointHandle , ImpulseJointSet , IntegrationParameters , IslandManager ,
8
+ MultibodyJointHandle , MultibodyJointSet , NarrowPhase , PhysicsHooks , PhysicsPipeline ,
9
+ QueryFilter as RapierQueryFilter , QueryPipeline , Ray , Real , RigidBodyHandle , RigidBodySet ,
10
10
} ;
11
11
12
12
use crate :: geometry:: { Collider , PointProjection , RayIntersection , ShapeCastHit } ;
@@ -33,7 +33,7 @@ pub struct RapierContext {
33
33
/// (not moving much) to reduce computations.
34
34
pub islands : IslandManager ,
35
35
/// The broad-phase, which detects potential contact pairs.
36
- pub broad_phase : DefaultBroadPhase ,
36
+ pub broad_phase : Box < dyn BroadPhase > ,
37
37
/// The narrow-phase, which computes contact points, tests intersections,
38
38
/// and maintain the contact and intersection graphs.
39
39
pub narrow_phase : NarrowPhase ,
@@ -80,7 +80,7 @@ impl Default for RapierContext {
80
80
fn default ( ) -> Self {
81
81
Self {
82
82
islands : IslandManager :: new ( ) ,
83
- broad_phase : DefaultBroadPhase :: new ( ) ,
83
+ broad_phase : Box :: new ( DefaultBroadPhase :: new ( ) ) ,
84
84
narrow_phase : NarrowPhase :: new ( ) ,
85
85
bodies : RigidBodySet :: new ( ) ,
86
86
colliders : ColliderSet :: new ( ) ,
@@ -260,7 +260,7 @@ impl RapierContext {
260
260
& gravity. into ( ) ,
261
261
& substep_integration_parameters,
262
262
& mut self . islands ,
263
- & mut self . broad_phase ,
263
+ & mut * self . broad_phase ,
264
264
& mut self . narrow_phase ,
265
265
& mut self . bodies ,
266
266
& mut self . colliders ,
@@ -291,7 +291,7 @@ impl RapierContext {
291
291
& gravity. into ( ) ,
292
292
& substep_integration_parameters,
293
293
& mut self . islands ,
294
- & mut self . broad_phase ,
294
+ & mut * self . broad_phase ,
295
295
& mut self . narrow_phase ,
296
296
& mut self . bodies ,
297
297
& mut self . colliders ,
@@ -315,7 +315,7 @@ impl RapierContext {
315
315
& gravity. into ( ) ,
316
316
& substep_integration_parameters,
317
317
& mut self . islands ,
318
- & mut self . broad_phase ,
318
+ & mut * self . broad_phase ,
319
319
& mut self . narrow_phase ,
320
320
& mut self . bodies ,
321
321
& mut self . colliders ,
0 commit comments