Struct ncollide::narrow_phase::SupportMapSupportMapContactGenerator
[−]
[src]
pub struct SupportMapSupportMapContactGenerator<P, M, S> where
P: Point, { /* fields omitted */ }
Persistent collision detector between two shapes having a support mapping function.
It is based on the GJK algorithm. This detector generates only one contact point. For a full
manifold generation, see IncrementalContactManifoldGenerator
.
Methods
impl<P, M, S> SupportMapSupportMapContactGenerator<P, M, S> where
P: Point,
S: Simplex<AnnotatedPoint<P>>,
[src]
P: Point,
S: Simplex<AnnotatedPoint<P>>,
fn new(simplex: S) -> SupportMapSupportMapContactGenerator<P, M, S>
Creates a new persistant collision detector between two shapes with support mapping functions.
It is initialized with a pre-created simplex.
Trait Implementations
impl<P, M, S> ContactGenerator<P, M> for SupportMapSupportMapContactGenerator<P, M, S> where
M: Isometry<P>,
P: Point,
S: Simplex<AnnotatedPoint<P>>,
[src]
M: Isometry<P>,
P: Point,
S: Simplex<AnnotatedPoint<P>>,
fn update(
&mut self,
&ContactDispatcher<P, M>,
ma: &M,
a: &(Shape<P, M> + 'static),
mb: &M,
b: &(Shape<P, M> + 'static),
prediction: <P as EuclideanSpace>::Real
) -> bool
&mut self,
&ContactDispatcher<P, M>,
ma: &M,
a: &(Shape<P, M> + 'static),
mb: &M,
b: &(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, S> Clone for SupportMapSupportMapContactGenerator<P, M, S> where
M: Clone,
P: Clone + Point,
S: Clone,
<P as Point>::Vector: Clone,
[src]
M: Clone,
P: Clone + Point,
S: Clone,
<P as Point>::Vector: Clone,