Skip to main content

PhysicsStateful

Trait PhysicsStateful 

Source
pub trait PhysicsStateful {
    type State;

    // Required methods
    fn save_state(&self) -> Self::State;
    fn restore_state(&mut self, state: Self::State);
}
Expand description

Trait for objects whose full physics state can be captured and restored.

Required Associated Types§

Source

type State

The type representing the saved state.

Required Methods§

Source

fn save_state(&self) -> Self::State

Capture the current state.

Source

fn restore_state(&mut self, state: Self::State)

Restore from a previously saved state.

Implementors§