Trait rhusics_core::Inertia
source · pub trait Inertia: Mul<Self, Output = Self> + Copy {
type Orientation;
fn infinite() -> Self;
fn invert(&self) -> Self;
fn tensor(&self, orientation: &Self::Orientation) -> Self;
}
Expand description
Moment of inertia, used for abstracting over 2D/3D inertia tensors
Required Associated Types
sourcetype Orientation
type Orientation
Orientation type for rotating the inertia to create a world space inertia tensor
Required Methods
sourcefn tensor(&self, orientation: &Self::Orientation) -> Self
fn tensor(&self, orientation: &Self::Orientation) -> Self
Compute the inertia tensor in the bodies given orientation