Geometry3DExt

Trait Geometry3DExt 

Source
pub trait Geometry3DExt: Geometry {
    // Required methods
    fn aabb_3d(&self) -> AABB3D<Self::Scalar>;
    fn surface_area(&self) -> Self::Scalar;
    fn mass(&self) -> Option<Self::Scalar>;
    fn center_of_mass(&self) -> (Self::Scalar, Self::Scalar, Self::Scalar);

    // Provided methods
    fn stackable(&self) -> bool { ... }
    fn max_stack_load(&self) -> Option<Self::Scalar> { ... }
}
Expand description

Extended trait for 3D geometries.

Required Methods§

Source

fn aabb_3d(&self) -> AABB3D<Self::Scalar>

Returns the 3D AABB.

Source

fn surface_area(&self) -> Self::Scalar

Returns the surface area of this geometry.

Source

fn mass(&self) -> Option<Self::Scalar>

Returns the mass of this geometry, if defined.

Source

fn center_of_mass(&self) -> (Self::Scalar, Self::Scalar, Self::Scalar)

Returns the center of mass of this geometry.

Provided Methods§

Source

fn stackable(&self) -> bool

Returns whether this geometry can be stacked upon.

Source

fn max_stack_load(&self) -> Option<Self::Scalar>

Returns the maximum stacking load this geometry can support.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§