pub struct FullMassProperties {
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],
}Fields§
§surface_area: f64§volume: f64§centroid: Vec3Volume centroid (unit density center of mass).
inertia: [[f64; 3]; 3]Inertia tensor about the centroid for unit density, row-major [[Ixx, Ixy, Ixz], [Ixy, Iyy, Iyz], [Ixz, Iyz, Izz]].
principal_moments: [f64; 3]Principal moments of inertia (eigenvalues of inertia) at unit
density, sorted ASCENDING: principal_moments[0] <= [1] <= [2].
Golovanov §8.11.
principal_axes: [[f64; 3]; 3]Principal axes of inertia (eigenvectors of inertia), one per row:
principal_axes[i] is the unit axis whose moment is
principal_moments[i]. The three axes are orthonormal and arranged as
a RIGHT-HANDED frame (determinant +1); the sign of the third axis is
fixed to enforce handedness. Density-independent.
Implementations§
Source§impl FullMassProperties
impl FullMassProperties
Sourcepub fn with_density(&self, density: f64) -> DensityMassProperties
pub fn with_density(&self, density: f64) -> DensityMassProperties
Scale the unit-density geometric result to a physical density
(Golovanov §8.11): mass = density * volume, inertia and the
principal moments scale by density, while the centroid and principal
axes are unchanged. Panics only on a non-finite density is avoided —
callers should pass a finite, positive density; a zero density yields a
massless (all-zero inertia) result, which is well defined.
Trait Implementations§
Source§impl Clone for FullMassProperties
impl Clone for FullMassProperties
Source§fn clone(&self) -> FullMassProperties
fn clone(&self) -> FullMassProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more