[][src]Struct mgf::RigidBodyVec

pub struct RigidBodyVec {
    pub x: Vec<Point3<f32>>,
    pub q: Vec<Quaternion<f32>>,
    pub collider: Vec<Moving<Component>>,
    // some fields omitted
}

A vector of rigid bodies.

Fields

x: Vec<Point3<f32>>q: Vec<Quaternion<f32>>collider: Vec<Moving<Component>>

Methods

impl RigidBodyVec[src]

pub fn new() -> Self[src]

Create an empty RigidBodyVec.

pub fn add_body(
    &mut self,
    collider: Component,
    mass: f32,
    restitution: f32,
    friction: f32,
    world_force: Vector3<f32>
) -> RigidBodyRef
[src]

Add a body to the rigid body.

pub fn integrate(&mut self, dt: f32)[src]

Calculate the rotation, velocity, tensor, and collider for each rigid body.

pub fn colliders(&self) -> Iter<Moving<Component>>[src]

Return an iterator for the colliders of the rigid body.

pub fn complete_motion(&mut self)[src]

Finish all motion that was initiated at the beginning of the frame by integrate.

Trait Implementations

impl ConstrainedSet<RigidBodyRef, Velocity, RigidBodyInfo> for RigidBodyVec[src]

impl Clone for RigidBodyVec[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.