Struct ncollide2df64::narrow::ImplicitImplicit
pub struct ImplicitImplicit<S, G1, G2> { // some 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<S, G1, G2> ImplicitImplicit<S, G1, G2>
fn new(prediction: N, simplex: S) -> ImplicitImplicit<S, G1, G2>
Creates a new persistent collision detector between two geometries with support mapping functions.
It is initialized with a pre-created simplex.
Trait Implementations
impl<__E: Encoder, S: Encodable<__E>, G1: Encodable<__E>, G2: Encodable<__E>> Encodable<__E> for ImplicitImplicit<S, G1, G2>
Automatically derived.
fn encode(&self, __arg_0: &mut __E)
impl<__D: Decoder, S: Decodable<__D>, G1: Decodable<__D>, G2: Decodable<__D>> Decodable<__D> for ImplicitImplicit<S, G1, G2>
Automatically derived.
fn decode(__arg_0: &mut __D) -> ImplicitImplicit<S, G1, G2>
impl<S: Clone, G1, G2> Clone for ImplicitImplicit<S, G1, G2>
fn clone(&self) -> ImplicitImplicit<S, G1, G2>
impl<S: Simplex<AnnotatedPoint>, G1: Implicit<V, M> + PreferedSamplingDirections<V, M>, G2: Implicit<V, M> + PreferedSamplingDirections<V, M>> CollisionDetector<G1, G2> for ImplicitImplicit<S, G1, G2>
fn update(&mut self, ma: &M, a: &G1, mb: &M, b: &G2)
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_colls(&self) -> uint
The number of collision detected during the last update.
fn colls(&self, out_colls: &mut ~[Contact])
Collects the collisions detected during the last update.
fn toi(_: Option<ImplicitImplicit<S, G1, G2>>, ma: &M, dir: &V, _: &N, a: &G1, mb: &M, b: &G2) -> Option<N>
Computes the time of impact of two objects.
Arguments
m1
- the first object transform.dir
- the first object displacement direction.dist
- the first object displacement distance.g1
- the first object.m2
- the second object transform.g2
- the second object.