Trait mgf::PhysicsObject [] [src]

pub trait PhysicsObject {
    fn integrate(&mut self, dt: f32);
fn get_dx(&self) -> Velocity;
fn set_dx(&mut self, v: Velocity);
fn pos(&self) -> Point3<f32>;
fn inv_mass(&self) -> f32;
fn inv_moment(&self) -> Matrix3<f32>;
fn restitution(&self) -> f32;
fn friction(&self) -> f32; }

A type that exhibits physical properties.

Required Methods

Integrate the object over the time step.

Return the velocity of the object.

Set the velocity of the object.

Return the position of the object at the end of the time step.

Return the inverse mass of the object.

Return the inverse moment of inertia tensor for the object.

Return the coefficient of restitution for the object.

Return the friction coefficient for the object.

Implementors