pub struct ContactHitEvent {
pub shape_id_a: ShapeId,
pub shape_id_b: ShapeId,
pub contact_id: ContactId,
pub point: Pos,
pub normal: Vec3,
pub approach_speed: f32,
pub user_material_id_a: u64,
pub user_material_id_b: u64,
}Expand description
A hit touch event is generated when two shapes collide faster than the hit speed threshold. (b3ContactHitEvent)
Fields§
§shape_id_a: ShapeIdId of the first shape
shape_id_b: ShapeIdId of the second shape
contact_id: ContactIdId of the contact. @warning may have been destroyed
point: PosPoint where the shapes hit, a mid-point between the two surfaces.
normal: Vec3Normal vector pointing from shape A to shape B
approach_speed: f32The speed the shapes are approaching. Always positive.
user_material_id_a: u64User material on shape A
user_material_id_b: u64User material on shape B
Trait Implementations§
Source§impl Clone for ContactHitEvent
impl Clone for ContactHitEvent
Source§fn clone(&self) -> ContactHitEvent
fn clone(&self) -> ContactHitEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ContactHitEvent
Source§impl Debug for ContactHitEvent
impl Debug for ContactHitEvent
Source§impl PartialEq for ContactHitEvent
impl PartialEq for ContactHitEvent
impl StructuralPartialEq for ContactHitEvent
Auto Trait Implementations§
impl Freeze for ContactHitEvent
impl RefUnwindSafe for ContactHitEvent
impl Send for ContactHitEvent
impl Sync for ContactHitEvent
impl Unpin for ContactHitEvent
impl UnsafeUnpin for ContactHitEvent
impl UnwindSafe for ContactHitEvent
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