[][src]Trait oxygengine_physics_2d::prelude::volumetric::Volumetric

pub trait Volumetric<N> where
    N: RealField
{ fn area(&self) -> N;
fn volume(&self) -> N;
fn center_of_mass(&self) -> Point<N, U2>;
fn unit_angular_inertia(
        &self
    ) -> Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>; fn mass(&self, density: N) -> N { ... }
fn angular_inertia(
        &self,
        mass: N
    ) -> Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer> { ... }
fn mass_properties(
        &self,
        density: N
    ) -> (N, Point<N, U2>, Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>) { ... }
fn transformed_mass_properties(
        &self,
        density: N,
        pos: &Isometry<N, U2, Unit<Complex<N>>>
    ) -> (Point<N, U2>, Inertia2<N>) { ... }
fn inertia(&self, density: N) -> Inertia2<N> { ... } }

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) -> Point<N, U2>

Computes the center of mass of this object.

fn unit_angular_inertia(
    &self
) -> Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>

Computes the angular inertia tensor of this object.

Loading content...

Provided methods

fn mass(&self, density: N) -> N

Given its density, this computes the mass of this object.

fn angular_inertia(
    &self,
    mass: N
) -> Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>

Given its mass, this computes the angular inertia of this object.

fn mass_properties(
    &self,
    density: N
) -> (N, Point<N, U2>, Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>)

Given its density, this computes the mass, center of mass, and inertia tensor of this object.

fn transformed_mass_properties(
    &self,
    density: N,
    pos: &Isometry<N, U2, Unit<Complex<N>>>
) -> (Point<N, U2>, Inertia2<N>)

Given its density and position, this computes the mass, transformed center of mass, and transformed inertia tensor of this object.

fn inertia(&self, density: N) -> Inertia2<N>

Loading content...

Implementors

impl<N> Volumetric<N> for Ball<N> where
    N: RealField
[src]

impl<N> Volumetric<N> for Capsule<N> where
    N: RealField
[src]

impl<N> Volumetric<N> for Compound<N> where
    N: RealField
[src]

fn mass_properties(
    &self,
    density: N
) -> (N, Point<N, U2>, Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>)
[src]

The mass properties of this CompoundData.

If density is not zero, it will be multiplied with the density of every object of the compound shape.

impl<N> Volumetric<N> for ConvexPolygon<N> where
    N: RealField
[src]

impl<N> Volumetric<N> for Cuboid<N> where
    N: RealField
[src]

impl<N> Volumetric<N> for dyn Shape<N> + 'static where
    N: RealField
[src]

Loading content...