Struct ncollide2df64::narrow::OneShotContactManifoldGenerator
pub struct OneShotContactManifoldGenerator<CD> { // some 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<CD> OneShotContactManifoldGenerator<CD>
fn new(prediction: N, cd: CD) -> OneShotContactManifoldGenerator<CD>
Creates a new one shot contact manifold generator.
Trait Implementations
impl<__E: Encoder, CD: Encodable<__E>> Encodable<__E> for OneShotContactManifoldGenerator<CD>
Automatically derived.
fn encode(&self, __arg_0: &mut __E)
impl<__D: Decoder, CD: Decodable<__D>> Decodable<__D> for OneShotContactManifoldGenerator<CD>
Automatically derived.
fn decode(__arg_0: &mut __D) -> OneShotContactManifoldGenerator<CD>
impl<CD: Clone> Clone for OneShotContactManifoldGenerator<CD>
Automatically derived.
fn clone(&self) -> OneShotContactManifoldGenerator<CD>
impl<CD: CollisionDetector<G1, G2>, G1, G2> CollisionDetector<G1, G2> for OneShotContactManifoldGenerator<CD>
fn update(&mut self, m1: &M, g1: &G1, m2: &M, g2: &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<OneShotContactManifoldGenerator<CD>>, m1: &M, dir: &LV, dist: &N, g1: &G1, m2: &M, g2: &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.