Struct ncollide2d::narrow_phase::DefaultNarrowPhase
source · pub struct DefaultNarrowPhase<N> { /* private fields */ }
Expand description
Collision detector dispatcher for collision objects.
Implementations§
source§impl<N: 'static> DefaultNarrowPhase<N>
impl<N: 'static> DefaultNarrowPhase<N>
sourcepub fn new(
contact_dispatcher: Box<dyn ContactDispatcher<N>>,
proximity_dispatcher: Box<dyn ProximityDispatcher<N>>
) -> DefaultNarrowPhase<N>
pub fn new(
contact_dispatcher: Box<dyn ContactDispatcher<N>>,
proximity_dispatcher: Box<dyn ProximityDispatcher<N>>
) -> DefaultNarrowPhase<N>
Creates a new DefaultNarrowPhase
.
Trait Implementations§
source§impl<N: Real, T> NarrowPhase<N, T> for DefaultNarrowPhase<N>
impl<N: Real, T> NarrowPhase<N, T> for DefaultNarrowPhase<N>
source§fn update(
&mut self,
objects: &CollisionObjectSlab<N, T>,
contact_events: &mut ContactEvents,
proximity_events: &mut ProximityEvents,
timestamp: usize
)
fn update(
&mut self,
objects: &CollisionObjectSlab<N, T>,
contact_events: &mut ContactEvents,
proximity_events: &mut ProximityEvents,
timestamp: usize
)
Updates this narrow phase.
source§fn handle_interaction(
&mut self,
contact_events: &mut ContactEvents,
proximity_events: &mut ProximityEvents,
objects: &CollisionObjectSlab<N, T>,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
started: bool
)
fn handle_interaction(
&mut self,
contact_events: &mut ContactEvents,
proximity_events: &mut ProximityEvents,
objects: &CollisionObjectSlab<N, T>,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle,
started: bool
)
Called when the broad phase detects that two objects are, or stop to be, in close proximity.
source§fn handle_removal(
&mut self,
_: &CollisionObjectSlab<N, T>,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle
)
fn handle_removal(
&mut self,
_: &CollisionObjectSlab<N, T>,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle
)
Called when the interactions between two objects have to be removed because at least one of the objects is being removed. Read more
source§fn contact_pair(
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle
) -> Option<&ContactAlgorithm<N>>
fn contact_pair(
&self,
handle1: CollisionObjectHandle,
handle2: CollisionObjectHandle
) -> Option<&ContactAlgorithm<N>>
Retrieve the contact pair for the given two objects. Read more
source§fn contact_pairs<'a>(
&'a self,
objects: &'a CollisionObjectSlab<N, T>
) -> ContactPairs<'a, N, T> ⓘ
fn contact_pairs<'a>(
&'a self,
objects: &'a CollisionObjectSlab<N, T>
) -> ContactPairs<'a, N, T> ⓘ
Returns all the potential contact pairs found during the broad phase, and validated by the
narrow phase. Read more
source§fn proximity_pairs<'a>(
&'a self,
objects: &'a CollisionObjectSlab<N, T>
) -> ProximityPairs<'a, N, T> ⓘ
fn proximity_pairs<'a>(
&'a self,
objects: &'a CollisionObjectSlab<N, T>
) -> ProximityPairs<'a, N, T> ⓘ
Returns all the potential proximity pairs found during the broad phase, and validated by
the narrow phase. Read more
Auto Trait Implementations§
impl<N> !RefUnwindSafe for DefaultNarrowPhase<N>
impl<N> Send for DefaultNarrowPhase<N>
impl<N> Sync for DefaultNarrowPhase<N>
impl<N> Unpin for DefaultNarrowPhase<N>
impl<N> !UnwindSafe for DefaultNarrowPhase<N>
Blanket Implementations§
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.