pub struct ContactEvents<'a> {
pub begin_events: &'a [ContactBeginTouchEvent],
pub end_events: &'a [ContactEndTouchEvent],
pub hit_events: &'a [ContactHitEvent],
}Expand description
Contact events are buffered in the world and are available as begin/end/hit
events in the current time step. These are borrowed from world storage and
invalidated by the next call to world_step. (b2ContactEvents)
Fields§
§begin_events: &'a [ContactBeginTouchEvent]Events for shapes that began touching this step.
end_events: &'a [ContactEndTouchEvent]Events for shapes that stopped touching. These are from the previous buffer so the user doesn’t need to flush events mid-step.
hit_events: &'a [ContactHitEvent]Events for impacts above the hit-event threshold.
Trait Implementations§
Source§impl<'a> Clone for ContactEvents<'a>
impl<'a> Clone for ContactEvents<'a>
Source§fn clone(&self) -> ContactEvents<'a>
fn clone(&self) -> ContactEvents<'a>
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<'a> Copy for ContactEvents<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContactEvents<'a>
impl<'a> RefUnwindSafe for ContactEvents<'a>
impl<'a> Send for ContactEvents<'a>
impl<'a> Sync for ContactEvents<'a>
impl<'a> Unpin for ContactEvents<'a>
impl<'a> UnsafeUnpin for ContactEvents<'a>
impl<'a> UnwindSafe for ContactEvents<'a>
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