Trait ncollide3d::bounding_volume::BoundingVolume [−][src]
pub trait BoundingVolume<N: RealField>: Debug { fn center(&self) -> Point<N>; 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>
[src]
Returns a point inside of this bounding volume. This is ideally its center.
fn intersects(&self, _: &Self) -> bool
[src]
Checks if this bounding volume intersect with another one.
fn contains(&self, _: &Self) -> bool
[src]
Checks if this bounding volume contains another one.
fn merge(&mut self, _: &Self)
[src]
Merges this bounding volume with another one. The merge is done in-place.
fn merged(&self, _: &Self) -> Self
[src]
Merges this bounding volume with another one.
fn loosen(&mut self, _: N)
[src]
Enlarges this bounding volume.
fn loosened(&self, _: N) -> Self
[src]
Creates a new, enlarged version, of this bounding volume.
fn tighten(&mut self, _: N)
[src]
Tighten this bounding volume.
fn tightened(&self, _: N) -> Self
[src]
Creates a new, tightened version, of this bounding volume.
Implementors
impl<N: RealField> BoundingVolume<N> for AABB<N>
[src]
impl<N: RealField> BoundingVolume<N> for AABB<N>
[src]fn center(&self) -> Point<N>
[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: RealField> BoundingVolume<N> for BoundingSphere<N>
[src]
impl<N: RealField> BoundingVolume<N> for BoundingSphere<N>
[src]fn center(&self) -> Point<N>
[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: RealField> BoundingVolume<N> for SpatializedNormalCone<N>
[src]
impl<N: RealField> BoundingVolume<N> for SpatializedNormalCone<N>
[src]