Struct rhusics::physics::Mass
[−]
[src]
pub struct Mass<S, I> { /* fields omitted */ }
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, usuallyScalar
orMatrix3
, seeInertia
for more information.
Methods
impl<S, I> Mass<S, I> where
S: BaseFloat,
I: Inertia,
[src]
S: BaseFloat,
I: Inertia,
fn new(mass: S) -> Self
[src]
Create new mass object
fn infinite() -> Self
[src]
Create new infinite mass object
fn new_with_inertia(mass: S, inertia: I) -> Self
[src]
Create new mass object with given inertia
fn from_volume_and_material<V>(volume: &V, material: &Material) -> Self where
V: Volume<S, I>,
[src]
V: Volume<S, I>,
Compute mass from the given volume shape and material
fn mass(&self) -> S
[src]
Get mass
fn inverse_mass(&self) -> S
[src]
Get inverse mass
fn local_inertia(&self) -> I
[src]
Get inertia in local space
fn world_inertia(&self, orientation: &I::Orientation) -> I
[src]
fn local_inverse_inertia(&self) -> I
[src]
Get inverse inertia in local space
fn world_inverse_inertia(&self, orientation: &I::Orientation) -> I
[src]
Get inverse inertia tensor in world space
Parameters:
orientation
: The current orientation of the body