Struct ncollide2d::pipeline::broad_phase::DBVTBroadPhase [−][src]
pub struct DBVTBroadPhase<N: RealField, BV, T> { /* fields omitted */ }
Expand description
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.
Implementations
impl<N, BV, T> DBVTBroadPhase<N, BV, T> where
N: RealField,
BV: 'static + BoundingVolume<N> + Clone,
[src]
impl<N, BV, T> DBVTBroadPhase<N, BV, T> where
N: RealField,
BV: 'static + BoundingVolume<N> + Clone,
[src]pub fn new(margin: N) -> DBVTBroadPhase<N, BV, T>
[src]
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]
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: RealField,
BV: BoundingVolume<N> + RayCast<N> + PointQuery<N> + Any + Send + Sync + Clone,
T: Any + Send + Sync + Clone,
[src]
impl<N, BV, T> BroadPhase<N, BV, T> for DBVTBroadPhase<N, BV, T> where
N: RealField,
BV: BoundingVolume<N> + RayCast<N> + PointQuery<N> + Any + Send + Sync + Clone,
T: Any + Send + Sync + Clone,
[src]fn proxy(&self, handle: BroadPhaseProxyHandle) -> Option<(&BV, &T)>
[src]
fn proxy(&self, handle: BroadPhaseProxyHandle) -> Option<(&BV, &T)>
[src]Retrieves the bounding volume and data associated to the given proxy.
fn first_interference_with_ray<'a, 'b>(
&'a self,
ray: &'b Ray<N>,
max_toi: N,
cost_fn: &'a dyn Fn(T, &'b Ray<N>, N) -> Option<(T, RayIntersection<N>)>
) -> Option<(T, RayIntersection<N>)>
[src]
fn first_interference_with_ray<'a, 'b>(
&'a self,
ray: &'b Ray<N>,
max_toi: N,
cost_fn: &'a dyn Fn(T, &'b Ray<N>, N) -> Option<(T, RayIntersection<N>)>
) -> Option<(T, RayIntersection<N>)>
[src]Returns the first object that interferes with a ray.
fn update(&mut self, handler: &mut dyn BroadPhaseInterferenceHandler<T>)
[src]
fn update(&mut self, handler: &mut dyn BroadPhaseInterferenceHandler<T>)
[src]Updates the object additions, removals, and interferences detection.
fn create_proxy(&mut self, bv: BV, data: T) -> BroadPhaseProxyHandle
[src]
fn create_proxy(&mut self, bv: BV, data: T) -> BroadPhaseProxyHandle
[src]Tells the broad phase to add a bounding-volume at the next update.
fn remove(
&mut self,
handles: &[BroadPhaseProxyHandle],
handler: &mut dyn FnMut(&T, &T)
)
[src]
fn remove(
&mut self,
handles: &[BroadPhaseProxyHandle],
handler: &mut dyn FnMut(&T, &T)
)
[src]Tells the broad phase to remove the given set of handles.
fn deferred_set_bounding_volume(
&mut self,
handle: BroadPhaseProxyHandle,
bounding_volume: BV
)
[src]
fn deferred_set_bounding_volume(
&mut self,
handle: BroadPhaseProxyHandle,
bounding_volume: BV
)
[src]Sets the next bounding volume to be used during the update of this broad phase.
fn deferred_recompute_all_proximities_with(
&mut self,
handle: BroadPhaseProxyHandle
)
[src]
fn deferred_recompute_all_proximities_with(
&mut self,
handle: BroadPhaseProxyHandle
)
[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]
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]
fn interferences_with_bounding_volume<'a>(
&'a self,
bv: &BV,
out: &mut Vec<&'a T>
)
[src]Collects every object which might intersect a given bounding volume.
fn interferences_with_ray<'a>(
&'a self,
ray: &Ray<N>,
max_toi: N,
out: &mut Vec<&'a T>
)
[src]
fn interferences_with_ray<'a>(
&'a self,
ray: &Ray<N>,
max_toi: 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]
fn interferences_with_point<'a>(
&'a self,
point: &Point<N>,
out: &mut Vec<&'a T>
)
[src]Collects every object which might contain a given point.
Auto Trait Implementations
impl<N, BV, T> RefUnwindSafe for DBVTBroadPhase<N, BV, T> where
BV: RefUnwindSafe,
N: RefUnwindSafe,
T: RefUnwindSafe,
BV: RefUnwindSafe,
N: RefUnwindSafe,
T: RefUnwindSafe,
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,
impl<N, BV, T> Unpin for DBVTBroadPhase<N, BV, T> where
BV: Unpin,
N: Unpin,
T: Unpin,
BV: Unpin,
N: Unpin,
T: Unpin,
impl<N, BV, T> UnwindSafe for DBVTBroadPhase<N, BV, T> where
BV: UnwindSafe,
N: UnwindSafe,
T: UnwindSafe,
BV: UnwindSafe,
N: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CheckedAs for T
[src]
impl<T> CheckedAs for T
[src]pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]Casts the value.
impl<T> Downcast for T where
T: Any,
[src]
impl<T> Downcast for T where
T: Any,
[src]pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]pub fn lossless_try_into(self) -> Option<Dst>
[src]
pub fn lossless_try_into(self) -> Option<Dst>
[src]Performs the conversion.
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]pub fn lossy_into(self) -> Dst
[src]
pub fn lossy_into(self) -> Dst
[src]Performs the conversion.
impl<T> OverflowingAs for T
[src]
impl<T> OverflowingAs for T
[src]pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]Casts the value.
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> SaturatingAs for T
[src]
impl<T> SaturatingAs for T
[src]pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]Casts the value.
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn to_subset(&self) -> Option<SS>
[src]The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
[src]
pub fn is_in_subset(&self) -> bool
[src]Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
[src]
pub fn from_subset(element: &SS) -> SP
[src]The inclusion map: converts self
to the equivalent element of its superset.
impl<T> UnwrappedAs for T
[src]
impl<T> UnwrappedAs for T
[src]pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]Casts the value.
impl<T> WrappingAs for T
[src]
impl<T> WrappingAs for T
[src]pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]Casts the value.