pub struct ParticlePool { /* private fields */ }Implementations§
Source§impl ParticlePool
impl ParticlePool
Sourcepub fn new(capacity: usize) -> ParticlePool
pub fn new(capacity: usize) -> ParticlePool
Trusted convenience constructor. Use try_new for untrusted capacities.
pub fn try_new(capacity: usize) -> Result<ParticlePool, ParticleError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn available(&self) -> usize
pub fn dropped(&self) -> u64
pub fn discarded(&self) -> u64
pub fn clear(&mut self)
pub fn reset_stats(&mut self)
pub fn spawn(&mut self, desc: ParticleDesc) -> Result<(), ParticleError>
pub fn spawn_with( &mut self, desc: ParticleDesc, motion: ParticleMotion, ) -> Result<(), ParticleError>
Sourcepub fn spawn_aged(
&mut self,
desc: ParticleDesc,
motion: ParticleMotion,
age: f32,
) -> Result<(), ParticleError>
pub fn spawn_aged( &mut self, desc: ParticleDesc, motion: ParticleMotion, age: f32, ) -> Result<(), ParticleError>
Birth-time catch-up used by emitters after the existing pool was updated. Invalid or already expired samples do not consume a slot.
pub fn update(&mut self, dt: f32) -> Result<(), ParticleError>
pub fn iter(&self) -> impl ExactSizeIterator
Auto Trait Implementations§
impl Freeze for ParticlePool
impl RefUnwindSafe for ParticlePool
impl Send for ParticlePool
impl Sync for ParticlePool
impl Unpin for ParticlePool
impl UnwindSafe for ParticlePool
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