Struct mgf::Contact [] [src]

pub struct Contact {
    pub a: Point3<f32>,
    pub b: Point3<f32>,
    pub n: Vector3<f32>,
    pub t: f32,
}

A point of contact between two objects occuring during a timestep.

Contact models a contact point generated by at least one moving volumetric geometry and some other geometry.

Fields

Contact point at time of collision for collider in global coordinates.

Contact point at time of collision for collidee in global coordinates.

Collision normal on the surface of the collider.

Time of impact. This is guaranteed to be in the interal [0, 1]. Contacts with a time of 0 can be considered resting contacts or a contact from the previous frame.

Methods

impl Contact
[src]

[src]

Computes an orthonormal basis for the contact. This is usually used to produce tangent vectors for friction contacts. Code taken from http://box2d.org/2014/02/computing-a-basis/

Trait Implementations

impl Copy for Contact
[src]

impl Clone for Contact
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Contact
[src]

[src]

Formats the value using the given formatter.

impl Neg for Contact
[src]

The resulting type after applying the - operator.

[src]

Negate the normal and swap contact points