Trait ncollide::broad_phase::BroadPhase
[−]
[src]
pub trait BroadPhase<P, BV, T> where
P: Point, { fn deferred_add(&mut self, uid: usize, bv: BV, data: T); fn deferred_remove(&mut self, uid: usize); fn deferred_set_bounding_volume(&mut self, uid: usize, bv: BV); fn deferred_recompute_all_proximities(&mut self); fn update(
&mut self,
allow_proximity: &mut FnMut(&T, &T),
proximity_handler: &mut FnMut(&T, &T, bool)
); fn interferences_with_bounding_volume(
&'a self,
bv: &BV,
out: &mut Vec<&'a T>
); fn interferences_with_ray(&'a self, ray: &Ray<P>, out: &mut Vec<&'a T>); fn interferences_with_point(&'a self, point: &P, out: &mut Vec<&'a T>); }
Trait all broad phase must implement.
Required Methods
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 deferred_set_bounding_volume(&mut self, uid: usize, bv: 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 update(
&mut self,
allow_proximity: &mut FnMut(&T, &T),
proximity_handler: &mut FnMut(&T, &T, bool)
)
&mut self,
allow_proximity: &mut FnMut(&T, &T),
proximity_handler: &mut FnMut(&T, &T, bool)
)
Updates the object additions, removals, and interferences detection.
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.
Implementors
impl<P, BV, T> BroadPhase<P, BV, T> for BruteForceBroadPhase<<P as EuclideanSpace>::Real, BV, T> where
BV: 'static + BoundingVolume<P> + RayCast<P, Id<Multiplicative>> + PointQuery<P, Id<Multiplicative>> + Clone,
P: Point,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,