pub struct MassProperties {
pub mass: f64,
pub centroid: Vec3,
pub inertia: Option<DMat3>,
}Expand description
Volumetric mass properties of a terminal.
Populated by the interpreter when the terminal’s Material carries a
density. Downstream consumers (Bevy, IK solvers, LOD selectors) read these
directly rather than recomputing from scope + face_profile.
All quantities are in world-frame SI units: mass in kg, centroid in
metres from the world origin, inertia is the moment-of-inertia tensor
about the centroid expressed as a 3×3 matrix in kg·m².
inertia is None for face profiles whose closed-form tensor is not
implemented (currently only FaceProfile::Taper); mass and centroid
are always populated whenever a density is available.
Fields§
§mass: f64§centroid: Vec3§inertia: Option<DMat3>Trait Implementations§
Source§impl Clone for MassProperties
impl Clone for MassProperties
Source§fn clone(&self) -> MassProperties
fn clone(&self) -> MassProperties
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MassProperties
impl Debug for MassProperties
Source§impl<'de> Deserialize<'de> for MassProperties
impl<'de> Deserialize<'de> for MassProperties
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MassProperties
impl PartialEq for MassProperties
Source§impl Serialize for MassProperties
impl Serialize for MassProperties
impl StructuralPartialEq for MassProperties
Auto Trait Implementations§
impl Freeze for MassProperties
impl RefUnwindSafe for MassProperties
impl Send for MassProperties
impl Sync for MassProperties
impl Unpin for MassProperties
impl UnsafeUnpin for MassProperties
impl UnwindSafe for MassProperties
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more