pub trait ProximityDetector<N: RealField + Copy>:
Any
+ Send
+ Sync {
// Required method
fn update(
&mut self,
dispatcher: &dyn ProximityDispatcher<N>,
ma: &Isometry<N>,
a: &dyn Shape<N>,
mb: &Isometry<N>,
b: &dyn Shape<N>,
margin: N,
) -> Option<Proximity>;
}
Expand description
Trait implemented by algorithms that determine if two objects are in close proximity.
Required Methods§
Sourcefn update(
&mut self,
dispatcher: &dyn ProximityDispatcher<N>,
ma: &Isometry<N>,
a: &dyn Shape<N>,
mb: &Isometry<N>,
b: &dyn Shape<N>,
margin: N,
) -> Option<Proximity>
fn update( &mut self, dispatcher: &dyn ProximityDispatcher<N>, ma: &Isometry<N>, a: &dyn Shape<N>, mb: &Isometry<N>, b: &dyn Shape<N>, margin: N, ) -> Option<Proximity>
Runs the proximity detection on two objects. It is assumed that the same proximity detector (the same instance) is always used with the same pair of object.