Trait ncollide2d::narrow_phase::ContactManifoldGenerator [−][src]
pub trait ContactManifoldGenerator<N: Real>: Any + Send + Sync { fn update(
&mut self,
dispatcher: &ContactDispatcher<N>,
ida: usize,
ma: &Isometry<N>,
a: &Shape<N>,
idb: usize,
mb: &Isometry<N>,
b: &Shape<N>,
prediction: &ContactPrediction<N>,
id_alloc: &mut IdAllocator
) -> bool; fn num_contacts(&self) -> usize; fn contacts<'a: 'b, 'b>(&'a self, out: &'b mut Vec<&'a ContactManifold<N>>); }
Trait implemented algorithms that compute contact points, normals and penetration depths.
Required Methods
fn update(
&mut self,
dispatcher: &ContactDispatcher<N>,
ida: usize,
ma: &Isometry<N>,
a: &Shape<N>,
idb: usize,
mb: &Isometry<N>,
b: &Shape<N>,
prediction: &ContactPrediction<N>,
id_alloc: &mut IdAllocator
) -> bool
&mut self,
dispatcher: &ContactDispatcher<N>,
ida: usize,
ma: &Isometry<N>,
a: &Shape<N>,
idb: usize,
mb: &Isometry<N>,
b: &Shape<N>,
prediction: &ContactPrediction<N>,
id_alloc: &mut IdAllocator
) -> bool
Runs the collision detection on two objects. It is assumed that the same collision detector (the same structure) is always used with the same pair of object.
fn num_contacts(&self) -> usize
The number of contacts found.
fn contacts<'a: 'b, 'b>(&'a self, out: &'b mut Vec<&'a ContactManifold<N>>)
Collects the contact manifolds generated by the last update.
Implementors
impl<N: Real> ContactManifoldGenerator<N> for BallBallManifoldGenerator<N>
impl<N: Real> ContactManifoldGenerator<N> for BallConvexPolyhedronManifoldGenerator<N>
impl<N: Real> ContactManifoldGenerator<N> for ConvexPolyhedronConvexPolyhedronManifoldGenerator<N>
impl<N: Real> ContactManifoldGenerator<N> for PlaneBallManifoldGenerator<N>
impl<N: Real> ContactManifoldGenerator<N> for PlaneConvexPolyhedronManifoldGenerator<N>
impl<N: Real> ContactManifoldGenerator<N> for CompositeShapeShapeManifoldGenerator<N>