Struct ncollide3d::query::ContactManifold [−][src]
pub struct ContactManifold<N: Real> { /* fields omitted */ }
A contact manifold.
A contat manifold is a set of contacts lying on the same plane. The convex hull of those contacts are often interpreted as a contact surface. This structure is responsible for matching new contacts with old ones in order to perform an approximat tracking of the contact points.
Methods
impl<N: Real> ContactManifold<N>
[src]
impl<N: Real> ContactManifold<N>
pub fn new() -> Self
[src]
pub fn new() -> Self
Initializes a contact manifold without any contact.
pub fn subshape_id1(&self) -> usize
[src]
pub fn subshape_id1(&self) -> usize
The identifier of the first sub-shape the contacts of this manifold lie on.
pub fn set_subshape_id1(&mut self, id: usize)
[src]
pub fn set_subshape_id1(&mut self, id: usize)
Sets the identifier of the first sub-shape the contacts of this manifold lie on.
pub fn subshape_id2(&self) -> usize
[src]
pub fn subshape_id2(&self) -> usize
The identifier of the first sub-shape the contacts of this manifold lie on.
pub fn set_subshape_id2(&mut self, id: usize)
[src]
pub fn set_subshape_id2(&mut self, id: usize)
Sets the identifier of the first sub-shape the contacts of this manifold lie on.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
The number of contacts contained by this manifold.
pub fn contacts(&self) -> &[TrackedContact<N>]
[src]
pub fn contacts(&self) -> &[TrackedContact<N>]
All the contact tracked by this manifold.
pub fn deepest_contact_id(&self) -> usize
[src]
pub fn deepest_contact_id(&self) -> usize
The index of the contact with the greatest penetration depth.
pub fn deepest_contact(&self) -> Option<&TrackedContact<N>>
[src]
pub fn deepest_contact(&self) -> Option<&TrackedContact<N>>
The contact of this manifold with the deepest penetration depth.
pub fn save_cache_and_clear(&mut self, gen: &mut IdAllocator)
[src]
pub fn save_cache_and_clear(&mut self, gen: &mut IdAllocator)
Save the contacts to a cache and empty the manifold.
pub fn push(
&mut self,
contact: Contact<N>,
kinematic: ContactKinematic<N>,
gen: &mut IdAllocator
) -> bool
[src]
pub fn push(
&mut self,
contact: Contact<N>,
kinematic: ContactKinematic<N>,
gen: &mut IdAllocator
) -> bool
Add a new contact to the manifold.
The manifold will attempt to match this contact with another one
previously added and added to the cache by the last call to
save_cache_and_clear
. The matching is done by spacial proximity, i.e.,
two contacts that are sufficiently close will be given the same identifer.
Trait Implementations
impl<N: Clone + Real> Clone for ContactManifold<N>
[src]
impl<N: Clone + Real> Clone for ContactManifold<N>
fn clone(&self) -> ContactManifold<N>
[src]
fn clone(&self) -> ContactManifold<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: Debug + Real> Debug for ContactManifold<N>
[src]
impl<N: Debug + Real> Debug for ContactManifold<N>
Auto Trait Implementations
impl<N> Send for ContactManifold<N> where
N: Scalar,
impl<N> Send for ContactManifold<N> where
N: Scalar,
impl<N> Sync for ContactManifold<N> where
N: Scalar,
impl<N> Sync for ContactManifold<N> where
N: Scalar,