[][src]Struct rapier3d::geometry::Contact

pub struct Contact {
    pub local_p1: Point<f32>,
    pub local_p2: Point<f32>,
    pub impulse: f32,
    pub tangent_impulse: [f32; 2],
    pub fid1: u8,
    pub fid2: u8,
    pub dist: f32,
}

A single contact between two collider.

Fields

local_p1: Point<f32>

The contact point in the local-space of the first collider.

local_p2: Point<f32>

The contact point in the local-space of the second collider.

impulse: f32

The impulse, along the contact normal, applied by this contact to the first collider's rigid-body.

The impulse applied to the second collider's rigid-body is given by -impulse.

tangent_impulse: [f32; 2]

The friction impulses along the basis orthonormal to the contact normal, applied to the first collider's rigid-body.

fid1: u8

The identifier of the subshape of the first collider involved in this contact.

For primitive shapes like cuboid, ball, etc., this is 0. For shapes like trimesh and heightfield this identifies the specific triangle involved in the contact.

fid2: u8

The identifier of the subshape of the second collider involved in this contact.

For primitive shapes like cuboid, ball, etc., this is 0. For shapes like trimesh and heightfield this identifies the specific triangle involved in the contact.

dist: f32

The distance between the two colliders along the contact normal.

If this is negative, the colliders are penetrating.

Trait Implementations

impl Clone for Contact[src]

impl Copy for Contact[src]

impl Debug for Contact[src]

Auto Trait Implementations

impl RefUnwindSafe for Contact

impl Send for Contact

impl Sync for Contact

impl Unpin for Contact

impl UnwindSafe for Contact

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Slottable for T where
    T: Copy
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,