pub struct BodySleepState {
pub dynamic: bool,
pub sleeping: bool,
pub wake_requested: bool,
pub quiet_time: f32,
}Expand description
A copied, current sleep snapshot for a live body; no solver state is exposed
for mutation. The dimensional world’s sleep_state method includes a
handle-checked example.
Fields§
§dynamic: boolOnly dynamic bodies participate in sleeping and sleep counters.
sleeping: bool§wake_requested: boolAn explicit wake request is pending until the next valid outer step ends. Edits, gravity and moving neighbors can also wake bodies without this flag.
quiet_time: f32Quiet simulation seconds, capped at the current solver’s sleep delay. Fixed and kinematic bodies report zero. This is not time spent asleep.
Trait Implementations§
Source§impl Clone for BodySleepState
impl Clone for BodySleepState
Source§fn clone(&self) -> BodySleepState
fn clone(&self) -> BodySleepState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BodySleepState
impl Debug for BodySleepState
Source§impl PartialEq for BodySleepState
impl PartialEq for BodySleepState
impl Copy for BodySleepState
impl StructuralPartialEq for BodySleepState
Auto Trait Implementations§
impl Freeze for BodySleepState
impl RefUnwindSafe for BodySleepState
impl Send for BodySleepState
impl Sync for BodySleepState
impl Unpin for BodySleepState
impl UnwindSafe for BodySleepState
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