Trait mgf::PhysicsObject [] [src]

pub trait PhysicsObject {
    fn integrate(&mut self, dt: f32);
fn state(&self) -> PhysicsState;
fn apply_impulse(&mut self, linear: Vector3<f32>, angular: Vector3<f32>);
fn update_dx(&mut self); }

A type that exhibits physical properties.

A PhysicsObject's primary function is to return a PhysicsState to be used during collision resolution. Beyond that it has various methods to be updated or choose to ignore such updates (for example, calling apply_impulse on a StaticBody is a no-op).

Required Methods

Integrate the object over the timestep

Return the physics state of the object

Apply linear and angular impulse to the object

Update the linear and angular positional derivatives

Implementors