pub struct SwarmScene { /* private fields */ }Expand description
~10k-particle CPU flow-field swarm, driven by named preset parameters.
Implementations§
Source§impl SwarmScene
impl SwarmScene
Sourcepub fn new(
device: &Device,
surface_format: TextureFormat,
particles: usize,
) -> Self
pub fn new( device: &Device, surface_format: TextureFormat, particles: usize, ) -> Self
Build the pipeline, buffers, and seeded particle set on device.
particles is the active tier’s
swarm_particles. The count
is fixed for the life of the scene — the instance buffer and the CPU
mirror are both sized to it here, so the per-frame path never allocates —
and a tier change rebuilds the scene rather than resizing it.
Auto Trait Implementations§
impl Freeze for SwarmScene
impl !RefUnwindSafe for SwarmScene
impl Send for SwarmScene
impl Sync for SwarmScene
impl Unpin for SwarmScene
impl UnsafeUnpin for SwarmScene
impl !UnwindSafe for SwarmScene
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