[][src]Struct nphysics2d::detection::ColliderContactManifold

pub struct ColliderContactManifold<'a, N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle> {
    pub handle1: CollHandle,
    pub collider1: &'a Collider<N, Handle>,
    pub handle2: CollHandle,
    pub collider2: &'a Collider<N, Handle>,
    pub manifold: &'a ContactManifold<N>,
}

A contact manifold between two bodies.

Fields

handle1: CollHandle

The handle of the first collider involved in the contact.

collider1: &'a Collider<N, Handle>

The first collider involved in the contact.

handle2: CollHandle

The handle of the second collider involved in the contact.

collider2: &'a Collider<N, Handle>

The second collider involved in the contact.

manifold: &'a ContactManifold<N>

The contact manifold.

Methods

impl<'a, N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle> ColliderContactManifold<'a, N, Handle, CollHandle>[src]

pub fn new(
    handle1: CollHandle,
    collider1: &'a Collider<N, Handle>,
    handle2: CollHandle,
    collider2: &'a Collider<N, Handle>,
    manifold: &'a ContactManifold<N>
) -> Self
[src]

Initialize a new contact manifold.

pub fn len(&self) -> usize[src]

The number of contacts on the manifold.

pub fn contacts(&self) -> impl Iterator<Item = &TrackedContact<N>>[src]

Get all the contacts from the manifold.

pub fn deepest_contact(&self) -> Option<&TrackedContact<N>>[src]

Get the deepest contact, if any, from the manifold.

pub fn body1(&self) -> Handle[src]

The handle of the first body involved in the contact.

pub fn body2(&self) -> Handle[src]

The handle of the first body involved in the contact.

pub fn body_part1(&self, feature1: FeatureId) -> BodyPartHandle<Handle>[src]

The handle of the first body part involved in the given contact on the specified feature.

The feature is assumed to belong to the first collider involved in this contact.

pub fn body_part2(&self, feature2: FeatureId) -> BodyPartHandle<Handle>[src]

The handle of the second body part involved in the given contact on the specified feature.

The feature is assumed to belong to the second collider involved in this contact.

pub fn anchor1(&self) -> &ColliderAnchor<N, Handle>[src]

The anchor between the fist collider and the body it is attached to.

pub fn anchor2(&self) -> &ColliderAnchor<N, Handle>[src]

The anchor between the fist collider and the body it is attached to.

Trait Implementations

impl<'a, N: Clone + RealField, Handle: Clone + BodyHandle, CollHandle: Clone + ColliderHandle> Clone for ColliderContactManifold<'a, N, Handle, CollHandle>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a, N, Handle, CollHandle> Send for ColliderContactManifold<'a, N, Handle, CollHandle> where
    N: Scalar

impl<'a, N, Handle, CollHandle> Unpin for ColliderContactManifold<'a, N, Handle, CollHandle> where
    CollHandle: Unpin

impl<'a, N, Handle, CollHandle> Sync for ColliderContactManifold<'a, N, Handle, CollHandle> where
    N: Scalar

impl<'a, N, Handle, CollHandle> !RefUnwindSafe for ColliderContactManifold<'a, N, Handle, CollHandle>

impl<'a, N, Handle, CollHandle> !UnwindSafe for ColliderContactManifold<'a, N, Handle, CollHandle>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,