Struct rhusics_core::ContactEvent
source · pub struct ContactEvent<ID, P>where
P: EuclideanSpace,
P::Diff: Debug,{
pub bodies: (ID, ID),
pub contact: Contact<P>,
}
Expand description
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
Implementations
sourceimpl<ID, P> ContactEvent<ID, P>where
ID: Clone + Debug,
P: EuclideanSpace,
P::Diff: VectorSpace + Zero + Debug,
impl<ID, P> ContactEvent<ID, P>where
ID: Clone + Debug,
P: EuclideanSpace,
P::Diff: VectorSpace + Zero + Debug,
sourcepub fn new_simple(strategy: CollisionStrategy, bodies: (ID, ID)) -> Self
pub fn new_simple(strategy: CollisionStrategy, bodies: (ID, ID)) -> Self
Convenience function to create a contact set with a simple Contact
.
Trait Implementations
sourceimpl<ID: Clone, P: Clone> Clone for ContactEvent<ID, P>where
P: EuclideanSpace,
P::Diff: Debug,
impl<ID: Clone, P: Clone> Clone for ContactEvent<ID, P>where
P: EuclideanSpace,
P::Diff: Debug,
sourcefn clone(&self) -> ContactEvent<ID, P>
fn clone(&self) -> ContactEvent<ID, P>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl<ID, P> RefUnwindSafe for ContactEvent<ID, P>where
ID: RefUnwindSafe,
P: RefUnwindSafe,
<P as EuclideanSpace>::Diff: RefUnwindSafe,
<P as EuclideanSpace>::Scalar: RefUnwindSafe,
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> Unpin for ContactEvent<ID, P>where
ID: Unpin,
P: Unpin,
<P as EuclideanSpace>::Diff: Unpin,
<P as EuclideanSpace>::Scalar: Unpin,
impl<ID, P> UnwindSafe for ContactEvent<ID, P>where
ID: UnwindSafe,
P: UnwindSafe,
<P as EuclideanSpace>::Diff: UnwindSafe,
<P as EuclideanSpace>::Scalar: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more