Struct mgf::CompoundDynamicBody [] [src]

pub struct CompoundDynamicBody {
    pub restitution: f32,
    pub friction: f32,
    pub total_inv_mass: f32,
    pub inv_moment_body: Matrix3<f32>,
    pub inv_moment: Matrix3<f32>,
    pub v: Vector3<f32>,
    pub omega: Vector3<f32>,
    pub v_step: Vector3<f32>,
    pub force: Vector3<f32>,
    pub torque: Vector3<f32>,
    pub collider: Compound,
    pub component_masses: Vec<f32>,
}

A generic physical body that has a mass, a volume, and experiences linear and rotational movement.

A CompoundDynamicBody is technically a shape, although its geometries are all considered to be in motion.

Fields

Methods

impl CompoundDynamicBody
[src]

[src]

Construct a new CompoundDynamicBody from a Vec of Components and masses.

Trait Implementations

impl Clone for CompoundDynamicBody
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl AddAssign<Vector3<f32>> for CompoundDynamicBody
[src]

[src]

Performs the += operation.

impl SubAssign<Vector3<f32>> for CompoundDynamicBody
[src]

[src]

Performs the -= operation.

impl Shape for CompoundDynamicBody
[src]

[src]

The center returned by a CompoundDynamicBody is the center of mass for that object.

[src]

Sets the center of the shape to p.

impl Delta for CompoundDynamicBody
[src]

[src]

impl BoundedBy<AABB> for CompoundDynamicBody
[src]

[src]

impl BoundedBy<Sphere> for CompoundDynamicBody
[src]

[src]

impl<RHS> Contacts<RHS> for CompoundDynamicBody where
    RHS: Contacts<Moving<Component>> + BoundedBy<AABB>, 
[src]

[src]

Calls the closure for each contact found. Returns true if any contact was found. Read more

[src]

Returns the last contact found, if one exists.

impl PhysicsObject for CompoundDynamicBody
[src]

[src]

Integrate the object over the time step.

[src]

Return the velocity of the object.

[src]

Set the velocity of the object.

[src]

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

[src]

Return the inverse mass of the object.

[src]

Return the inverse moment of inertia tensor for the object.

[src]

Return the coefficient of restitution for the object.

[src]

Return the friction coefficient for the object.