Trait nphysics3d::volumetric::Volumetric
[−]
[src]
pub trait Volumetric<N: Scalar, P, I: Mul<N, Output=I>> { fn surface(&self) -> N; fn volume(&self) -> N; fn center_of_mass(&self) -> P; fn unit_angular_inertia(&self) -> I; fn mass(&self, density: N) -> N { ... } fn angular_inertia(&self, mass: N) -> I { ... } fn mass_properties(&self, density: N) -> (N, P, I) { ... } }
Trait implemented by objects which have a mass, a center of mass, and an inertia tensor.
Required Methods
fn surface(&self) -> N
Computes the surface of this object.
fn volume(&self) -> N
Computes the volume of this object.
fn center_of_mass(&self) -> P
Computes the center of mass of this object.
fn unit_angular_inertia(&self) -> I
Computes the angular inertia tensor of this object.
Provided Methods
fn mass(&self, density: N) -> N
Given its density, this computes the mass of this object.
fn angular_inertia(&self, mass: N) -> I
Given its mass, this computes the angular inertia of this object.
fn mass_properties(&self, density: N) -> (N, P, I)
Given its density, this computes the mass, center of mass, and inertia tensor of this object.
Implementors
impl<N: Scalar> Volumetric<N, Pnt2<N>, Mat1<N>> for Ball2<N>
impl<N: Scalar> Volumetric<N, Pnt3<N>, Mat3<N>> for Ball3<N>
impl<N: Scalar> Volumetric<N, Pnt2<N>, Mat1<N>> for Cylinder2<N>
impl<N: Scalar> Volumetric<N, Pnt3<N>, Mat3<N>> for Cylinder3<N>
impl<N: Scalar> Volumetric<N, Pnt2<N>, Mat1<N>> for Cuboid2<N>
impl<N: Scalar> Volumetric<N, Pnt3<N>, Mat3<N>> for Cuboid3<N>
impl<N: Scalar> Volumetric<N, Pnt2<N>, Mat1<N>> for Cone2<N>
impl<N: Scalar> Volumetric<N, Pnt3<N>, Mat3<N>> for Cone3<N>
impl<N: Scalar> Volumetric<N, Pnt2<N>, Mat1<N>> for Compound2<N>
impl<N: Scalar> Volumetric<N, Pnt3<N>, Mat3<N>> for Compound3<N>
impl<N: Scalar> Volumetric<N, Pnt3<N>, Mat3<N>> for Convex3<N>
impl<N: Scalar> Volumetric<N, Pnt2<N>, Mat1<N>> for Convex2<N>
impl<N> Volumetric<N, Pnt2<N>, Mat1<N>> for Repr<Pnt2<N>, Iso2<N>> where N: Scalar
impl<N> Volumetric<N, Pnt3<N>, Mat3<N>> for Repr<Pnt3<N>, Iso3<N>> where N: Scalar