pub struct ParticleSystem { /* private fields */ }Expand description
Zero-allocation fixed-capacity 2D particle simulation engine.
Implementations§
Source§impl ParticleSystem
Particle emission, deterministic PRNG, and zero-alloc update methods for ParticleSystem.
impl ParticleSystem
Particle emission, deterministic PRNG, and zero-alloc update methods for ParticleSystem.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn emit_burst(
&mut self,
origin: Point,
count: usize,
config: ParticleEmitterConfig,
)
pub fn emit_burst( &mut self, origin: Point, count: usize, config: ParticleEmitterConfig, )
Emits count particles at origin using config without allocating heap memory.
§Arguments
&Self- Mutable particle system.Point- World-space emission origin.usize- Number of particles to emit.ParticleEmitterConfig- Emission parameters.
Source§impl ParticleSystem
impl ParticleSystem
pub fn get_pool(&self) -> &Vec<Particle>
pub fn get_mut_pool(&mut self) -> &mut Vec<Particle>
pub fn set_pool(&mut self, val: Vec<Particle>) -> &mut Self
pub fn get_mut_cursor(&mut self) -> &mut usize
pub fn get_mut_rng_state(&mut self) -> &mut u64
pub fn get_gravity(&self) -> Point
pub fn get_mut_gravity(&mut self) -> &mut Point
pub fn set_gravity(&mut self, val: Point) -> &mut Self
pub fn get_active_count(&self) -> usize
pub fn get_mut_active_count(&mut self) -> &mut usize
pub fn set_active_count(&mut self, val: usize) -> &mut Self
Trait Implementations§
Source§impl Clone for ParticleSystem
impl Clone for ParticleSystem
Source§impl Debug for ParticleSystem
impl Debug for ParticleSystem
Auto Trait Implementations§
impl Forget for ParticleSystem
impl Freeze for ParticleSystem
impl Move for ParticleSystem
impl RefUnwindSafe for ParticleSystem
impl Send for ParticleSystem
impl Sync for ParticleSystem
impl Unpin for ParticleSystem
impl UnsafeUnpin for ParticleSystem
impl UnwindSafe for ParticleSystem
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