Struct rhusics_core::Mass

source ·
pub struct Mass<S, I> { /* private fields */ }
Expand description

Mass

Mass properties for a body. Inertia is the moment of inertia in the base pose. For retrieving the inertia tensor for the body in its current orientation, see world_inertia and world_inverse_inertia.

Type parameters:

  • I: Inertia type, usually Scalar or Matrix3, see Inertia for more information.

Implementations

Create new mass object

Create new infinite mass object

Create new mass object with given inertia

Compute mass from the given volume shape and material

Get mass

Get inverse mass

Get inertia in local space

Get inertia tensor in world space

Parameters:
  • orientation: The current orientation of the body

Get inverse inertia in local space

Get inverse inertia tensor in world space

Parameters:
  • orientation: The current orientation of the body

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.