Struct rhusics::collide::ContactEvent [] [src]

pub struct ContactEvent<ID, P> where
    P: EuclideanSpace,
    P::Diff: Debug
{ pub bodies: (ID, ID), pub contact: Contact<P>, }

Contains all contact information for a single contact, together with IDs of the colliding bodies

Type parameters

  • ID: The ID type of the body. This is supplied by the user of the library. In the ECS case, this will be Entity.
  • V: cgmath vector type

Fields

The ids of the two colliding bodies

The contact between the colliding bodies

Methods

impl<ID, P> ContactEvent<ID, P> where
    ID: Clone + Debug,
    P: EuclideanSpace,
    P::Diff: VectorSpace + Zero + Debug
[src]

[src]

Create a new contact event

[src]

Convenience function to create a contact set with a simple Contact.

Trait Implementations

impl<ID: Debug, P: Debug> Debug for ContactEvent<ID, P> where
    P: EuclideanSpace,
    P::Diff: Debug
[src]

[src]

Formats the value using the given formatter.

impl<ID: Clone, P: Clone> Clone for ContactEvent<ID, P> where
    P: EuclideanSpace,
    P::Diff: Debug
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more