pub struct PhysicsPipeline {
pub config: PipelineConfig,
pub stats: PipelineStats,
}Expand description
Orchestrates a complete simulation step through all enabled pipeline stages.
The stage execution order is guaranteed:
BroadPhase → NarrowPhase → ConstraintSolve → Integration → PostProcess
Fields§
§config: PipelineConfigPipeline configuration.
stats: PipelineStatsCumulative stats across all steps since creation.
Implementations§
Source§impl PhysicsPipeline
impl PhysicsPipeline
Sourcepub fn new(config: PipelineConfig) -> Self
pub fn new(config: PipelineConfig) -> Self
Create a new pipeline with the given configuration.
Sourcepub fn step(&mut self, world_state: &mut WorldState, dt: f64) -> PipelineStats
pub fn step(&mut self, world_state: &mut WorldState, dt: f64) -> PipelineStats
Run one full simulation step (all enabled stages, for substeps
iterations) over world_state with time step dt.
Returns the PipelineStats for this step.
Auto Trait Implementations§
impl Freeze for PhysicsPipeline
impl RefUnwindSafe for PhysicsPipeline
impl Send for PhysicsPipeline
impl Sync for PhysicsPipeline
impl Unpin for PhysicsPipeline
impl UnsafeUnpin for PhysicsPipeline
impl UnwindSafe for PhysicsPipeline
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more