Trait ncollide2d::narrow_phase::ProximityDetector [−][src]
pub trait ProximityDetector<N: Real>: Any + Send + Sync { fn update(
&mut self,
dispatcher: &ProximityDispatcher<N>,
ma: &Isometry<N>,
a: &Shape<N>,
mb: &Isometry<N>,
b: &Shape<N>,
margin: N
) -> bool; fn proximity(&self) -> Proximity; }
Trait implemented by algorithms that determine if two objects are in close proximity.
Required Methods
fn update(
&mut self,
dispatcher: &ProximityDispatcher<N>,
ma: &Isometry<N>,
a: &Shape<N>,
mb: &Isometry<N>,
b: &Shape<N>,
margin: N
) -> bool
&mut self,
dispatcher: &ProximityDispatcher<N>,
ma: &Isometry<N>,
a: &Shape<N>,
mb: &Isometry<N>,
b: &Shape<N>,
margin: N
) -> bool
Runs the proximity detection on two objects. It is assumed that the same proximity detector (the same structure) is always used with the same pair of object.
fn proximity(&self) -> Proximity
The number of collision detected during the last update.
Implementors
impl<N: Real> ProximityDetector<N> for BallBallProximityDetector
impl<N: Real> ProximityDetector<N> for PlaneSupportMapProximityDetector
impl<N: Real> ProximityDetector<N> for SupportMapPlaneProximityDetector
impl<N: Real> ProximityDetector<N> for SupportMapSupportMapProximityDetector<N>
impl<N: Real> ProximityDetector<N> for CompositeShapeShapeProximityDetector<N>