Trait nphysics2d::volumetric::Volumetric
[−]
[src]
pub trait Volumetric<N: Real, P, I: Mul<N, Output = I>> { fn area(&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 area(&self) -> N
Computes the area 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: Real> Volumetric<N, Point2<N>, Matrix1<N>> for Ball2<N>
impl<N: Real> Volumetric<N, Point3<N>, Matrix3<N>> for Ball3<N>
impl<N: Real> Volumetric<N, Point2<N>, Matrix1<N>> for Cylinder2<N>
impl<N: Real> Volumetric<N, Point3<N>, Matrix3<N>> for Cylinder3<N>
impl<N: Real> Volumetric<N, Point2<N>, Matrix1<N>> for Cone2<N>
impl<N: Real> Volumetric<N, Point3<N>, Matrix3<N>> for Cone3<N>
impl<N: Real> Volumetric<N, Point2<N>, Matrix1<N>> for Cuboid2<N>
impl<N: Real> Volumetric<N, Point3<N>, Matrix3<N>> for Cuboid3<N>
impl<N: Real> Volumetric<N, Point2<N>, Matrix1<N>> for ConvexHull2<N>
impl<N: Real> Volumetric<N, Point<N>, AngularInertia<N>> for Compound<Point<N>, Isometry<N>>
impl<N: Real> Volumetric<N, Point<N>, AngularInertia<N>> for Shape<Point<N>, Isometry<N>>