Trait heron::rapier_plugin::rapier3d::parry::bounding_volume::BoundingVolume
source · pub trait BoundingVolume {
fn center(&self) -> OPoint<f32, Const<3>>;
fn intersects(&self, _: &Self) -> bool;
fn contains(&self, _: &Self) -> bool;
fn merge(&mut self, _: &Self);
fn merged(&self, _: &Self) -> Self;
fn loosen(&mut self, _: f32);
fn loosened(&self, _: f32) -> Self;
fn tighten(&mut self, _: f32);
fn tightened(&self, _: f32) -> 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
sourcefn center(&self) -> OPoint<f32, Const<3>>
fn center(&self) -> OPoint<f32, Const<3>>
Returns a point inside of this bounding volume. This is ideally its center.
sourcefn intersects(&self, _: &Self) -> bool
fn intersects(&self, _: &Self) -> bool
Checks if this bounding volume intersect with another one.