pub struct MassProperties {
pub volume: Scalar,
pub mass: Scalar,
pub center: Vector3,
pub inertia: [[Scalar; 3]; 3],
pub converged: bool,
pub evaluations: usize,
}Expand description
The mass properties of a body: its volume, its mass, where its centre of
mass is and its inertia tensor about it. (The area of its boundary is no
mass property, and costs more to integrate: see Model::solid_area.)
Every value is an enclosure in the sense of geop_core_math::quadrature:
proven as far as interval arithmetic goes, widened by the quadrature’s
estimate of its truncation error — converged says whether that
estimate came within the tolerance asked.
Fields§
§volume: Scalar§mass: ScalarThe volume times the density: the volume itself, until a density
is given (see MassProperties::with_density).
center: Vector3§inertia: [[Scalar; 3]; 3]The inertia tensor about center, along the world’s axes:
I_ij = ∫ ρ (|r|² δ_ij - r_i r_j) dV, r measured from center —
with ρ = 1 until a density is given.
converged: bool§evaluations: usizeHow many surface points the integration took: the work it did.
Implementations§
Source§impl MassProperties
impl MassProperties
Sourcepub fn with_density(&self, density: Scalar) -> Self
pub fn with_density(&self, density: Scalar) -> Self
The body of density one (see Model::mass_properties) made of a
uniform density: its mass and inertia that many times.
Sourcepub fn placed(&self, pose: &Pose) -> GeopResult<Self>
pub fn placed(&self, pose: &Pose) -> GeopResult<Self>
The body moved by pose: its centre moved, its inertia turned with
it (R I Rᵀ).
Sourcepub fn combine(parts: &[Self]) -> GeopResult<Option<Self>>
pub fn combine(parts: &[Self]) -> GeopResult<Option<Self>>
The bodies parts taken together: masses, volumes and areas added,
the centre their mass-weighted mean, and each inertia moved to it by
the parallel axis theorem. None for no parts.
Sourcepub fn principal(&self) -> GeopResult<PrincipalAxes>
pub fn principal(&self) -> GeopResult<PrincipalAxes>
The principal moments of inertia and their axes.
Trait Implementations§
Source§impl Clone for MassProperties
impl Clone for MassProperties
Source§fn clone(&self) -> MassProperties
fn clone(&self) -> MassProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more