[][src]Trait oxygengine_physics_2d::prelude::ncollide2d::bounding_volume::BoundingVolume

pub trait BoundingVolume<N>: Debug where
    N: RealField
{ fn center(&self) -> Point<N, U2>;
fn intersects(&self, &Self) -> bool;
fn contains(&self, &Self) -> bool;
fn merge(&mut self, &Self);
fn merged(&self, &Self) -> Self;
fn loosen(&mut self, N);
fn loosened(&self, N) -> Self;
fn tighten(&mut self, N);
fn tightened(&self, N) -> Self; }

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

fn center(&self) -> Point<N, U2>

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

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

Checks if this bounding volume intersect with another one.

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

Checks if this bounding volume contains another one.

fn merge(&mut self, &Self)

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

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

Merges this bounding volume with another one.

fn loosen(&mut self, N)

Enlarges this bounding volume.

fn loosened(&self, N) -> Self

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

fn tighten(&mut self, N)

Tighten this bounding volume.

fn tightened(&self, N) -> Self

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

Loading content...

Implementors

impl<N> BoundingVolume<N> for AABB<N> where
    N: RealField
[src]

impl<N> BoundingVolume<N> for BoundingSphere<N> where
    N: RealField
[src]

impl<N> BoundingVolume<N> for SpatializedNormalCone<N> where
    N: RealField
[src]

Loading content...