#[repr(C)]pub struct b2BodyMoveEvent {
pub userData: *mut c_void,
pub transform: b2Transform,
pub bodyId: b2BodyId,
pub fellAsleep: bool,
}Expand description
Body move events triggered when a body moves. Triggered when a body moves due to simulation. Not reported for bodies moved by the user. This also has a flag to indicate that the body went to sleep so the application can also sleep that actor/entity/object associated with the body. On the other hand if the flag does not indicate the body went to sleep then the application can treat the actor/entity/object associated with the body as awake. This is an efficient way for an application to update game object transforms rather than calling functions such as b2Body_GetTransform() because this data is delivered as a contiguous array and it is only populated with bodies that have moved. @note If sleeping is disabled all dynamic and kinematic bodies will trigger move events.
Fields§
§userData: *mut c_void§transform: b2Transform§bodyId: b2BodyId§fellAsleep: boolTrait Implementations§
Source§impl Clone for b2BodyMoveEvent
impl Clone for b2BodyMoveEvent
Source§fn clone(&self) -> b2BodyMoveEvent
fn clone(&self) -> b2BodyMoveEvent
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for b2BodyMoveEvent
impl Debug for b2BodyMoveEvent
impl Copy for b2BodyMoveEvent
Auto Trait Implementations§
impl Freeze for b2BodyMoveEvent
impl RefUnwindSafe for b2BodyMoveEvent
impl !Send for b2BodyMoveEvent
impl !Sync for b2BodyMoveEvent
impl Unpin for b2BodyMoveEvent
impl UnwindSafe for b2BodyMoveEvent
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)