Struct ncollide::narrow_phase::OneShotContactManifoldGenerator
[−]
[src]
pub struct OneShotContactManifoldGenerator<P, M, CD> where
P: Point, { /* fields omitted */ }
Contact manifold generator producing a full manifold at the first update.
Whenever a new contact is detected (i.e. when the current manifold is empty) a full manifold is
generated. Then, the manifold is incrementally updated by an
IncrementalContactManifoldGenerator
.
Methods
impl<P, M, CD> OneShotContactManifoldGenerator<P, M, CD> where
CD: ContactGenerator<P, M>,
P: Point,
[src]
CD: ContactGenerator<P, M>,
P: Point,
fn new(cd: CD) -> OneShotContactManifoldGenerator<P, M, CD>
Creates a new one shot contact manifold generator.
Trait Implementations
impl<P, M, CD> ContactGenerator<P, M> for OneShotContactManifoldGenerator<P, M, CD> where
CD: ContactGenerator<P, M>,
M: Isometry<P>,
P: Point,
[src]
CD: ContactGenerator<P, M>,
M: Isometry<P>,
P: Point,
fn update(
&mut self,
d: &ContactDispatcher<P, M>,
m1: &M,
g1: &(Shape<P, M> + 'static),
m2: &M,
g2: &(Shape<P, M> + 'static),
prediction: <P as EuclideanSpace>::Real
) -> bool
&mut self,
d: &ContactDispatcher<P, M>,
m1: &M,
g1: &(Shape<P, M> + 'static),
m2: &M,
g2: &(Shape<P, M> + 'static),
prediction: <P as EuclideanSpace>::Real
) -> 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. Read more
fn num_contacts(&self) -> usize
The number of contacts generated the last update.
fn contacts(&self, out_contacts: &mut Vec<Contact<P>>)
Collects the contacts generated during the last update.
impl<P, M, CD> Clone for OneShotContactManifoldGenerator<P, M, CD> where
CD: Clone,
M: Clone,
P: Clone + Point,
[src]
CD: Clone,
M: Clone,
P: Clone + Point,