pub struct SubsystemManager {
pub world: World,
pub bodies: Vec<RigidBody>,
pub broad_phase: BroadPhase,
pub narrow_phase: NarrowPhase,
pub solver: ConstraintSolver,
pub integrator: Integrator,
pub listener: Listener,
pub emitters: Vec<(Emitter, f32)>,
pub mixer: Mixer,
}Expand description
Registry of active subsystems for the current Runtime — real owned
instances, not stubs: an ecs-core World (available for
application-level entity/Transform use; not synced with bodies
below — no such mapping is defined anywhere in the workspace yet, and
inventing one here would be new, undocumented design, not wiring
together what already exists), physics-core’s body list plus its
broad/narrow-phase and solver/integrator, and audio-core’s listener,
emitters and mixer. The only place in the workspace allowed to know
about every *-core at once — see docs/dependency-rules.md rule 7.
Fields§
§world: World§bodies: Vec<RigidBody>§broad_phase: BroadPhase§narrow_phase: NarrowPhase§solver: ConstraintSolver§integrator: Integrator§listener: Listener§emitters: Vec<(Emitter, f32)>§mixer: MixerImplementations§
Source§impl SubsystemManager
impl SubsystemManager
pub fn new(mixer: Mixer) -> Self
Sourcepub fn step_physics(&mut self, dt: f32)
pub fn step_physics(&mut self, dt: f32)
Advances every body by dt: integrate, find broad-phase candidate
pairs, generate exact contacts, resolve them. The same pipeline
physics-core’s own tests exercise by hand
(full_step_ball_settles_on_static_floor_without_sinking_through),
centralized here as the one real per-frame physics step.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SubsystemManager
impl !Send for SubsystemManager
impl !Sync for SubsystemManager
impl !UnwindSafe for SubsystemManager
impl Freeze for SubsystemManager
impl Unpin for SubsystemManager
impl UnsafeUnpin for SubsystemManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.