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, usuallyScalar
orMatrix3
, seeInertia
for more information.
Implementations
sourceimpl<S, I> Mass<S, I>where
S: BaseFloat,
I: Inertia,
impl<S, I> Mass<S, I>where
S: BaseFloat,
I: Inertia,
sourcepub fn new_with_inertia(mass: S, inertia: I) -> Self
pub fn new_with_inertia(mass: S, inertia: I) -> Self
Create new mass object with given inertia
sourcepub fn from_volume_and_material<V>(volume: &V, material: &Material) -> Selfwhere
V: Volume<S, I>,
pub fn from_volume_and_material<V>(volume: &V, material: &Material) -> Selfwhere
V: Volume<S, I>,
Compute mass from the given volume shape and material
sourcepub fn inverse_mass(&self) -> S
pub fn inverse_mass(&self) -> S
Get inverse mass
sourcepub fn local_inertia(&self) -> I
pub fn local_inertia(&self) -> I
Get inertia in local space
sourcepub fn world_inertia(&self, orientation: &I::Orientation) -> I
pub fn world_inertia(&self, orientation: &I::Orientation) -> I
sourcepub fn local_inverse_inertia(&self) -> I
pub fn local_inverse_inertia(&self) -> I
Get inverse inertia in local space
sourcepub fn world_inverse_inertia(&self, orientation: &I::Orientation) -> I
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
Trait Implementations
Auto Trait Implementations
impl<S, I> RefUnwindSafe for Mass<S, I>where
I: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, I> Send for Mass<S, I>where
I: Send,
S: Send,
impl<S, I> Sync for Mass<S, I>where
I: Sync,
S: Sync,
impl<S, I> Unpin for Mass<S, I>where
I: Unpin,
S: Unpin,
impl<S, I> UnwindSafe for Mass<S, I>where
I: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more