Trait parry3d::bounding_volume::BoundingVolume

source ·
pub trait BoundingVolume {
    // Required methods
    fn center(&self) -> Point<Real>;
    fn intersects(&self, _: &Self) -> bool;
    fn contains(&self, _: &Self) -> bool;
    fn merge(&mut self, _: &Self);
    fn merged(&self, _: &Self) -> Self;
    fn loosen(&mut self, _: Real);
    fn loosened(&self, _: Real) -> Self;
    fn tighten(&mut self, _: Real);
    fn tightened(&self, _: Real) -> Self;
}
Expand description

Trait of bounding volumes.

Bounding volumes are coarse approximations of shapes. It usually have constant time intersection, inclusion test. Two bounding volume must also be mergeable into a bigger bounding volume.

Required Methods§

source

fn center(&self) -> Point<Real>

Returns a point inside of this bounding volume. This is ideally its center.

source

fn intersects(&self, _: &Self) -> bool

Checks if this bounding volume intersect with another one.

source

fn contains(&self, _: &Self) -> bool

Checks if this bounding volume contains another one.

source

fn merge(&mut self, _: &Self)

Merges this bounding volume with another one. The merge is done in-place.

source

fn merged(&self, _: &Self) -> Self

Merges this bounding volume with another one.

source

fn loosen(&mut self, _: Real)

Enlarges this bounding volume.

source

fn loosened(&self, _: Real) -> Self

Creates a new, enlarged version, of this bounding volume.

source

fn tighten(&mut self, _: Real)

Tighten this bounding volume.

source

fn tightened(&self, _: Real) -> Self

Creates a new, tightened version, of this bounding volume.

Object Safety§

This trait is not object safe.

Implementors§