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