#[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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more