Struct rhusics_core::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]

Create a new contact event

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]

Formats the value using the given formatter. Read more

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<ID, P> Send for ContactEvent<ID, P> where
    ID: Send,
    P: Send,
    <P as EuclideanSpace>::Diff: Send,
    <P as EuclideanSpace>::Scalar: Send

impl<ID, P> Sync for ContactEvent<ID, P> where
    ID: Sync,
    P: Sync,
    <P as EuclideanSpace>::Diff: Sync,
    <P as EuclideanSpace>::Scalar: Sync