Struct ncollide3d::broad_phase::DBVTBroadPhase
[−]
[src]
pub struct DBVTBroadPhase<N: Real, BV, T> { /* 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<N, BV, T> DBVTBroadPhase<N, BV, T> where
N: Real,
BV: 'static + BoundingVolume<N> + Clone,
[src]
N: Real,
BV: 'static + BoundingVolume<N> + Clone,
pub fn new(margin: N) -> DBVTBroadPhase<N, BV, T>
[src]
Creates a new broad phase based on a Dynamic Bounding Volume Tree.
pub fn num_interferences(&self) -> usize
[src]
Number of interferences detected by this broad phase.
Trait Implementations
impl<N, BV, T> BroadPhase<N, BV, T> for DBVTBroadPhase<N, BV, T> where
N: Real,
BV: BoundingVolume<N> + RayCast<N> + PointQuery<N> + Any + Send + Sync + Clone,
T: Any + Send + Sync,
[src]
N: Real,
BV: BoundingVolume<N> + RayCast<N> + PointQuery<N> + Any + Send + Sync + Clone,
T: Any + Send + Sync,
fn update(
&mut self,
allow_proximity: &mut FnMut(&T, &T) -> bool,
handler: &mut FnMut(&T, &T, bool)
)
[src]
&mut self,
allow_proximity: &mut FnMut(&T, &T) -> bool,
handler: &mut FnMut(&T, &T, bool)
)
Updates the object additions, removals, and interferences detection.
fn create_proxy(&mut self, bv: BV, data: T) -> ProxyHandle
[src]
Tells the broad phase to add a bounding-volume at the next update.
fn remove(&mut self, handles: &[ProxyHandle], handler: &mut FnMut(&T, &T))
[src]
Tells the broad phase to remove the given set of handles.
fn deferred_set_bounding_volume(
&mut self,
handle: ProxyHandle,
bounding_volume: BV
)
[src]
&mut self,
handle: ProxyHandle,
bounding_volume: BV
)
Sets the next bounding volume to be used during the update of this broad phase.
fn deferred_recompute_all_proximities_with(&mut self, handle: ProxyHandle)
[src]
Forces the broad-phase to recompute and re-report all the proximities with the given object.
fn deferred_recompute_all_proximities(&mut self)
[src]
Forces the broad-phase to recompute and re-report all the proximities.
fn interferences_with_bounding_volume<'a>(
&'a self,
bv: &BV,
out: &mut Vec<&'a T>
)
[src]
&'a self,
bv: &BV,
out: &mut Vec<&'a T>
)
Collects every object which might intersect a given bounding volume.
fn interferences_with_ray<'a>(&'a self, ray: &Ray<N>, out: &mut Vec<&'a T>)
[src]
Collects every object which might intersect a given ray.
fn interferences_with_point<'a>(
&'a self,
point: &Point<N>,
out: &mut Vec<&'a T>
)
[src]
&'a self,
point: &Point<N>,
out: &mut Vec<&'a T>
)
Collects every object which might contain a given point.
Auto Trait Implementations
impl<N, BV, T> Send for DBVTBroadPhase<N, BV, T> where
BV: Send,
T: Send,
BV: Send,
T: Send,
impl<N, BV, T> Sync for DBVTBroadPhase<N, BV, T> where
BV: Sync,
T: Sync,
BV: Sync,
T: Sync,