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 beEntity
.V
: cgmath vector type
Fields
bodies: (ID, ID)
The ids of the two colliding bodies
contact: Contact<P>
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]
impl<ID, P> ContactEvent<ID, P> where
ID: Clone + Debug,
P: EuclideanSpace,
P::Diff: VectorSpace + Zero + Debug,
pub fn new(bodies: (ID, ID), contact: Contact<P>) -> Self
[src]
pub fn new(bodies: (ID, ID), contact: Contact<P>) -> Self
Create a new contact event
pub fn new_simple(strategy: CollisionStrategy, bodies: (ID, ID)) -> Self
[src]
pub fn new_simple(strategy: CollisionStrategy, bodies: (ID, ID)) -> Self
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]
impl<ID: Debug, P: Debug> Debug for ContactEvent<ID, P> where
P: EuclideanSpace,
P::Diff: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
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]
impl<ID: Clone, P: Clone> Clone for ContactEvent<ID, P> where
P: EuclideanSpace,
P::Diff: Debug,
fn clone(&self) -> ContactEvent<ID, P>
[src]
fn clone(&self) -> ContactEvent<ID, P>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]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> 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,
impl<ID, P> Sync for ContactEvent<ID, P> where
ID: Sync,
P: Sync,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,