pub struct SimStats {
pub body_count: usize,
pub sleeping_count: usize,
pub awake_count: usize,
pub contact_count: usize,
pub simulation_time: f64,
pub total_kinetic_energy: f64,
pub max_linear_speed: f64,
pub max_angular_speed: f64,
}Expand description
Per-step simulation performance and state statistics.
Retrieved via PyPhysicsWorld::stats() after each step() call.
Fields§
§body_count: usizeTotal number of active (non-removed) bodies.
sleeping_count: usizeNumber of bodies currently sleeping.
awake_count: usizeNumber of bodies that are awake (body_count - sleeping_count).
contact_count: usizeNumber of contacts detected in the most recent step.
simulation_time: f64Accumulated simulation time (seconds).
total_kinetic_energy: f64Total kinetic energy summed over all dynamic bodies (½mv²).
max_linear_speed: f64Largest linear speed among all dynamic bodies.
max_angular_speed: f64Largest angular speed among all dynamic bodies.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimStats
impl RefUnwindSafe for SimStats
impl Send for SimStats
impl Sync for SimStats
impl Unpin for SimStats
impl UnsafeUnpin for SimStats
impl UnwindSafe for SimStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.