Trait heron::rapier_plugin::rapier::parry::bounding_volume::BoundingVolume [−][src]
pub trait BoundingVolume { pub fn center(&self) -> Point<f32, 3_usize>; pub fn intersects(&self, &Self) -> bool; pub fn contains(&self, &Self) -> bool; pub fn merge(&mut self, &Self); pub fn merged(&self, &Self) -> Self; pub fn loosen(&mut self, f32); pub fn loosened(&self, f32) -> Self; pub fn tighten(&mut self, f32); pub fn tightened(&self, f32) -> 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
pub fn center(&self) -> Point<f32, 3_usize>
[src]
Returns a point inside of this bounding volume. This is ideally its center.
pub fn intersects(&self, &Self) -> bool
[src]
Checks if this bounding volume intersect with another one.
pub fn contains(&self, &Self) -> bool
[src]
Checks if this bounding volume contains another one.
pub fn merge(&mut self, &Self)
[src]
Merges this bounding volume with another one. The merge is done in-place.
pub fn merged(&self, &Self) -> Self
[src]
Merges this bounding volume with another one.
pub fn loosen(&mut self, f32)
[src]
Enlarges this bounding volume.
pub fn loosened(&self, f32) -> Self
[src]
Creates a new, enlarged version, of this bounding volume.
pub fn tighten(&mut self, f32)
[src]
Tighten this bounding volume.
pub fn tightened(&self, f32) -> Self
[src]
Creates a new, tightened version, of this bounding volume.