Type Alias rapier2d::geometry::Contact

source ·
pub type Contact = TrackedContact<ContactData>;
Expand description

A contact between two colliders.

Aliased Type§

struct Contact {
    pub local_p1: OPoint<f32, Const<2>>,
    pub local_p2: OPoint<f32, Const<2>>,
    pub dist: f32,
    pub fid1: PackedFeatureId,
    pub fid2: PackedFeatureId,
    pub data: ContactData,
}

Fields§

§local_p1: OPoint<f32, Const<2>>

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

§local_p2: OPoint<f32, Const<2>>

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

§dist: f32

The distance between the two contact points.

§fid1: PackedFeatureId

The feature ID of the first shape involved in the contact.

§fid2: PackedFeatureId

The feature ID of the second shape involved in the contact.

§data: ContactData

User-data associated to this contact.