Struct rhusics_core::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]
impl<S, I> Mass<S, I> where
S: BaseFloat,
I: Inertia,
pub fn new(mass: S) -> Self
[src]
pub fn new(mass: S) -> Self
Create new mass object
pub fn infinite() -> Self
[src]
pub fn infinite() -> Self
Create new infinite mass object
pub fn new_with_inertia(mass: S, inertia: I) -> Self
[src]
pub fn new_with_inertia(mass: S, inertia: I) -> Self
Create new mass object with given inertia
pub fn from_volume_and_material<V>(volume: &V, material: &Material) -> Self where
V: Volume<S, I>,
[src]
pub fn from_volume_and_material<V>(volume: &V, material: &Material) -> Self where
V: Volume<S, I>,
Compute mass from the given volume shape and material
pub fn mass(&self) -> S
[src]
pub fn mass(&self) -> S
Get mass
pub fn inverse_mass(&self) -> S
[src]
pub fn inverse_mass(&self) -> S
Get inverse mass
pub fn local_inertia(&self) -> I
[src]
pub fn local_inertia(&self) -> I
Get inertia in local space
pub fn world_inertia(&self, orientation: &I::Orientation) -> I
[src]
pub fn world_inertia(&self, orientation: &I::Orientation) -> I
pub fn local_inverse_inertia(&self) -> I
[src]
pub fn local_inverse_inertia(&self) -> I
Get inverse inertia in local space
pub fn world_inverse_inertia(&self, orientation: &I::Orientation) -> I
[src]
pub fn world_inverse_inertia(&self, orientation: &I::Orientation) -> I
Get inverse inertia tensor in world space
Parameters:
orientation
: The current orientation of the body