[−][src]Trait oxygengine_physics_2d::prelude::ncollide2d::bounding_volume::BoundingVolume
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.
Implementors
impl<N> BoundingVolume<N> for AABB<N> where
N: RealField,
[src]
N: RealField,
fn center(&self) -> Point<N, U2>
[src]
fn intersects(&self, other: &AABB<N>) -> bool
[src]
fn contains(&self, other: &AABB<N>) -> bool
[src]
fn merge(&mut self, other: &AABB<N>)
[src]
fn merged(&self, other: &AABB<N>) -> AABB<N>
[src]
fn loosen(&mut self, amount: N)
[src]
fn loosened(&self, amount: N) -> AABB<N>
[src]
fn tighten(&mut self, amount: N)
[src]
fn tightened(&self, amount: N) -> AABB<N>
[src]
impl<N> BoundingVolume<N> for BoundingSphere<N> where
N: RealField,
[src]
N: RealField,
fn center(&self) -> Point<N, U2>
[src]
fn intersects(&self, other: &BoundingSphere<N>) -> bool
[src]
fn contains(&self, other: &BoundingSphere<N>) -> bool
[src]
fn merge(&mut self, other: &BoundingSphere<N>)
[src]
fn merged(&self, other: &BoundingSphere<N>) -> BoundingSphere<N>
[src]
fn loosen(&mut self, amount: N)
[src]
fn loosened(&self, amount: N) -> BoundingSphere<N>
[src]
fn tighten(&mut self, amount: N)
[src]
fn tightened(&self, amount: N) -> BoundingSphere<N>
[src]
impl<N> BoundingVolume<N> for SpatializedNormalCone<N> where
N: RealField,
[src]
N: RealField,