Struct rhusics::collide::Contact [] [src]

pub struct Contact<P> where
    P: EuclideanSpace
{ pub strategy: CollisionStrategy, pub normal: <P as EuclideanSpace>::Diff, pub penetration_depth: <P as EuclideanSpace>::Scalar, pub contact_point: P, pub time_of_impact: <P as EuclideanSpace>::Scalar, }

Contact manifold for a single collision contact point.

Type parameters

  • P: cgmath point type

Fields

The collision strategy used for this contact.

The collision normal. Only applicable if the collision strategy is not CollisionOnly

The penetration depth. Only applicable if the collision strategy is not CollisionOnly

The contact point. Only applicable if the collision strategy is not CollisionOnly

The time of impact, only applicable for continuous collision detection, value is in range 0.0..1.0

Methods

impl<P> Contact<P> where
    P: EuclideanSpace,
    <P as EuclideanSpace>::Diff: VectorSpace,
    <P as EuclideanSpace>::Diff: Zero
[src]

[src]

Create a new contact manifold, with default collision normal and penetration depth

[src]

Create a new contact manifold, with the given collision normal and penetration depth

[src]

Create a new contact manifold, complete with contact point

Trait Implementations

impl<P> Clone for Contact<P> where
    P: Clone + EuclideanSpace,
    <P as EuclideanSpace>::Diff: Clone,
    <P as EuclideanSpace>::Scalar: Clone,
    <P as EuclideanSpace>::Scalar: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<P> Debug for Contact<P> where
    P: Debug + EuclideanSpace,
    <P as EuclideanSpace>::Diff: Debug,
    <P as EuclideanSpace>::Scalar: Debug,
    <P as EuclideanSpace>::Scalar: Debug
[src]

[src]

Formats the value using the given formatter.