pub struct DensityMassProperties {
pub density: f64,
pub mass: f64,
pub surface_area: f64,
pub volume: f64,
pub centroid: Vec3,
pub inertia: [[f64; 3]; 3],
pub principal_moments: [f64; 3],
pub principal_axes: [[f64; 3]; 3],
}Expand description
Mass properties scaled to a physical density (Golovanov §8.11). The
underlying FullMassProperties is a UNIT-density geometric result; here
mass = density * volume and every inertia quantity scales linearly with
density (inertia = density * geometric_inertia). The centroid and the
principal AXES are density-independent; only the principal MOMENTS and the
mass scale with density.
Fields§
§density: f64Density used to scale the geometric (unit-density) properties.
mass: f64mass = density * volume.
surface_area: f64§volume: f64§centroid: Vec3Center of mass (identical to the unit-density centroid).
inertia: [[f64; 3]; 3]Centroidal inertia tensor = density * geometric_inertia, row-major.
principal_moments: [f64; 3]Principal moments = density * geometric_principal_moments, ascending.
principal_axes: [[f64; 3]; 3]Principal axes (identical to the unit-density axes; density-invariant).
Trait Implementations§
Source§impl Clone for DensityMassProperties
impl Clone for DensityMassProperties
Source§fn clone(&self) -> DensityMassProperties
fn clone(&self) -> DensityMassProperties
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 moreimpl Copy for DensityMassProperties
Source§impl Debug for DensityMassProperties
impl Debug for DensityMassProperties
Auto Trait Implementations§
impl Freeze for DensityMassProperties
impl RefUnwindSafe for DensityMassProperties
impl Send for DensityMassProperties
impl Sync for DensityMassProperties
impl Unpin for DensityMassProperties
impl UnsafeUnpin for DensityMassProperties
impl UnwindSafe for DensityMassProperties
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