pub struct ParticleSystemStats {
pub basic: ParticleStats,
pub capacity: usize,
pub fill_ratio: f32,
pub total_kinetic_energy: f32,
pub mean_age: f32,
pub max_age: f32,
pub velocity_std_dev: f32,
}Expand description
Extended particle system statistics.
Fields§
§basic: ParticleStatsBasic stats.
capacity: usizeTotal buffer capacity.
fill_ratio: f32Fill ratio (active / capacity).
total_kinetic_energy: f32Total kinetic energy.
mean_age: f32Mean age of alive particles.
max_age: f32Maximum age of alive particles.
velocity_std_dev: f32Velocity standard deviation.
Implementations§
Source§impl ParticleSystemStats
impl ParticleSystemStats
Sourcepub fn compute_extended(buffer: &ParticleBuffer) -> Self
pub fn compute_extended(buffer: &ParticleBuffer) -> Self
Compute extended statistics from a buffer.
Sourcepub fn is_near_capacity(&self, threshold: f32) -> bool
pub fn is_near_capacity(&self, threshold: f32) -> bool
Whether the buffer is at or near capacity.
Trait Implementations§
Source§impl Clone for ParticleSystemStats
impl Clone for ParticleSystemStats
Source§fn clone(&self) -> ParticleSystemStats
fn clone(&self) -> ParticleSystemStats
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 moreAuto Trait Implementations§
impl Freeze for ParticleSystemStats
impl RefUnwindSafe for ParticleSystemStats
impl Send for ParticleSystemStats
impl Sync for ParticleSystemStats
impl Unpin for ParticleSystemStats
impl UnsafeUnpin for ParticleSystemStats
impl UnwindSafe for ParticleSystemStats
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more