pub struct ContactEvent {
pub body_a: usize,
pub body_b: usize,
pub event_type: ContactEventType,
pub normal: Vec3Fix,
pub point: Vec3Fix,
pub depth: Fix128,
pub relative_velocity: Fix128,
}Expand description
A contact event between two bodies
Fields§
§body_a: usizeFirst body index
body_b: usizeSecond body index
event_type: ContactEventTypeEvent type
normal: Vec3FixContact normal, unit length, pointing from body_b toward body_a
(the crate-wide Contact::normal
contract): moving body_a along +normal separates the pair.
Zero for ContactEventType::End.
point: Vec3FixContact point (world space)
depth: Fix128Penetration depth
relative_velocity: Fix128Relative velocity along the normal, (v_a − v_b) · normal: negative
while the bodies approach each other
Trait Implementations§
Source§impl Clone for ContactEvent
impl Clone for ContactEvent
impl Copy for ContactEvent
Source§impl Debug for ContactEvent
impl Debug for ContactEvent
impl Eq for ContactEvent
Source§impl PartialEq for ContactEvent
impl PartialEq for ContactEvent
impl StructuralPartialEq for ContactEvent
Auto Trait Implementations§
impl Freeze for ContactEvent
impl RefUnwindSafe for ContactEvent
impl Send for ContactEvent
impl Sync for ContactEvent
impl Unpin for ContactEvent
impl UnsafeUnpin for ContactEvent
impl UnwindSafe for ContactEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more