aboutsummaryrefslogtreecommitdiff
path: root/src_testbed/physics/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src_testbed/physics/mod.rs')
-rw-r--r--src_testbed/physics/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src_testbed/physics/mod.rs b/src_testbed/physics/mod.rs
index b89f9c8..29e9a46 100644
--- a/src_testbed/physics/mod.rs
+++ b/src_testbed/physics/mod.rs
@@ -1,5 +1,5 @@
use crossbeam::channel::Receiver;
-use rapier::dynamics::{CCDSolver, IntegrationParameters, JointSet, RigidBodySet};
+use rapier::dynamics::{CCDSolver, IntegrationParameters, IslandManager, JointSet, RigidBodySet};
use rapier::geometry::{BroadPhase, ColliderSet, ContactEvent, IntersectionEvent, NarrowPhase};
use rapier::math::Vector;
use rapier::pipeline::{PhysicsHooks, PhysicsPipeline, QueryPipeline};
@@ -68,6 +68,7 @@ impl PhysicsSnapshot {
}
pub struct PhysicsState {
+ pub islands: IslandManager,
pub broad_phase: BroadPhase,
pub narrow_phase: NarrowPhase,
pub bodies: RigidBodySet,
@@ -78,12 +79,13 @@ pub struct PhysicsState {
pub query_pipeline: QueryPipeline,
pub integration_parameters: IntegrationParameters,
pub gravity: Vector<f32>,
- pub hooks: Box<dyn PhysicsHooks>,
+ pub hooks: Box<dyn PhysicsHooks<RigidBodySet, ColliderSet>>,
}
impl PhysicsState {
pub fn new() -> Self {
Self {
+ islands: IslandManager::new(),
broad_phase: BroadPhase::new(),
narrow_phase: NarrowPhase::new(),
bodies: RigidBodySet::new(),