#[repr(C)]pub struct b3ContactHitEvent {
pub shapeIdA: b3ShapeId,
pub shapeIdB: b3ShapeId,
pub contactId: b3ContactId,
pub point: b3Pos,
pub normal: b3Vec3,
pub approachSpeed: f32,
pub userMaterialIdA: u64,
pub userMaterialIdB: u64,
}Expand description
A hit touch event is generated when two shapes collide with a speed faster than the hit speed threshold. This may be reported for speculative contacts that have a confirmed impulse.
Fields§
§shapeIdA: b3ShapeIdId of the first shape
shapeIdB: b3ShapeIdId of the second shape
contactId: b3ContactIdId of the contact. @warning this contact may have been destroyed @see b3Contact_IsValid
point: b3PosPoint where the shapes hit at the beginning of the time step. This is a mid-point between the two surfaces. It could be at speculative point where the two shapes were not touching at the beginning of the time step.
normal: b3Vec3Normal vector pointing from shape A to shape B
approachSpeed: f32The speed the shapes are approaching. Always positive. Typically in meters per second.
userMaterialIdA: u64User material on shape A
userMaterialIdB: u64User material on shape B
Trait Implementations§
Source§impl Clone for b3ContactHitEvent
impl Clone for b3ContactHitEvent
Source§fn clone(&self) -> b3ContactHitEvent
fn clone(&self) -> b3ContactHitEvent
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 b3ContactHitEvent
Auto Trait Implementations§
impl Freeze for b3ContactHitEvent
impl RefUnwindSafe for b3ContactHitEvent
impl Send for b3ContactHitEvent
impl Sync for b3ContactHitEvent
impl Unpin for b3ContactHitEvent
impl UnsafeUnpin for b3ContactHitEvent
impl UnwindSafe for b3ContactHitEvent
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