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