Struct ncollide::broad_phase::DBVTBroadPhase
[−]
[src]
pub struct DBVTBroadPhase<P, BV, T> where
P: Point, { /* fields omitted */ }
Broad phase based on a Dynamic Bounding Volume Tree.
It uses two separate trees: one for static objects and which is never updated, and one for moving objects.
Methods
impl<P, BV, T> DBVTBroadPhase<P, BV, T> where
BV: 'static + BoundingVolume<P> + Clone,
P: Point,
[src]
BV: 'static + BoundingVolume<P> + Clone,
P: Point,
fn new(
margin: <P as EuclideanSpace>::Real,
small_keys: bool
) -> DBVTBroadPhase<P, BV, T>
margin: <P as EuclideanSpace>::Real,
small_keys: bool
) -> DBVTBroadPhase<P, BV, T>
Creates a new broad phase based on a Dynamic Bounding Volume Tree.
fn num_interferences(&self) -> usize
Number of interferences detected by this broad phase.
Trait Implementations
impl<P, BV, T> BroadPhase<P, BV, T> for DBVTBroadPhase<P, BV, T> where
BV: 'static + BoundingVolume<P> + RayCast<P, Id<Multiplicative>> + PointQuery<P, Id<Multiplicative>> + Clone,
P: Point,
[src]
BV: 'static + BoundingVolume<P> + RayCast<P, Id<Multiplicative>> + PointQuery<P, Id<Multiplicative>> + Clone,
P: Point,
fn deferred_add(&mut self, uid: usize, bv: BV, data: T)
Tells the broad phase to add an element during the next update.
fn deferred_remove(&mut self, uid: usize)
Tells the broad phase to remove an element during the next update.
fn update(
&mut self,
allow_proximity: &mut FnMut(&T, &T),
handler: &mut FnMut(&T, &T, bool)
)
&mut self,
allow_proximity: &mut FnMut(&T, &T),
handler: &mut FnMut(&T, &T, bool)
)
Updates the object additions, removals, and interferences detection.
fn deferred_set_bounding_volume(&mut self, uid: usize, bounding_volume: BV)
Sets the next bounding volume to be used during the update of this broad phase.
fn deferred_recompute_all_proximities(&mut self)
Forces the broad-phase to recompute and re-report all the proximities.
fn interferences_with_bounding_volume(&'a self, bv: &BV, out: &mut Vec<&'a T>)
Collects every object which might intersect a given bounding volume.
fn interferences_with_ray(&'a self, ray: &Ray<P>, out: &mut Vec<&'a T>)
Collects every object which might intersect a given ray.
fn interferences_with_point(&'a self, point: &P, out: &mut Vec<&'a T>)
Collects every object which might contain a given point.