pub struct GpuParticleSystem {
pub config: EmitterConfig,
pub particles: Vec<GpuParticle>,
pub max_particles: usize,
}Expand description
GPU particle system managing emission and integration of many particles.
Fields§
§config: EmitterConfigEmitter configuration.
particles: Vec<GpuParticle>Currently active particles.
max_particles: usizeMaximum number of particles allowed simultaneously.
Implementations§
Source§impl GpuParticleSystem
impl GpuParticleSystem
Sourcepub fn new(config: EmitterConfig, max_particles: usize) -> Self
pub fn new(config: EmitterConfig, max_particles: usize) -> Self
Create a new particle system with the given emitter config and capacity.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Return the number of currently alive particles.
Trait Implementations§
Source§impl Clone for GpuParticleSystem
impl Clone for GpuParticleSystem
Source§fn clone(&self) -> GpuParticleSystem
fn clone(&self) -> GpuParticleSystem
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 moreAuto Trait Implementations§
impl Freeze for GpuParticleSystem
impl RefUnwindSafe for GpuParticleSystem
impl Send for GpuParticleSystem
impl Sync for GpuParticleSystem
impl Unpin for GpuParticleSystem
impl UnsafeUnpin for GpuParticleSystem
impl UnwindSafe for GpuParticleSystem
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