PhysicsEngine

Trait PhysicsEngine 

Source
pub trait PhysicsEngine {
    type Error;

    // Required methods
    fn reset(&mut self) -> Result<(), Self::Error>;
    fn step(&mut self) -> Result<(), Self::Error>;
    fn shutdown(self);
    fn set_step_time(&mut self, dt: Duration) -> Result<&mut Self, Self::Error>;
    fn set_gravity(
        &mut self,
        gravity: impl Into<[f64; 3]>,
    ) -> Result<&mut Self, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn reset(&mut self) -> Result<(), Self::Error>

Source

fn step(&mut self) -> Result<(), Self::Error>

Source

fn shutdown(self)

Source

fn set_step_time(&mut self, dt: Duration) -> Result<&mut Self, Self::Error>

Source

fn set_gravity( &mut self, gravity: impl Into<[f64; 3]>, ) -> Result<&mut Self, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§