pub struct NiagaraSystem3D { /* private fields */ }Expand description
UE5 Niagara-class zero-allocation Structure-of-Arrays 3D SIMD particle system with curl-noise turbulence, floor bounce, and depth-tested billboard rendering.
Implementations§
Source§impl NiagaraSystem3D
SoA 3D particle emission, curl-noise kinematics, floor collision, and depth-tested billboard compositing for NiagaraSystem3D.
impl NiagaraSystem3D
SoA 3D particle emission, curl-noise kinematics, floor collision, and depth-tested billboard compositing for NiagaraSystem3D.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn emit_burst(&mut self, count: usize, config: &NiagaraEmitterConfig3D)
pub fn emit_burst(&mut self, count: usize, config: &NiagaraEmitterConfig3D)
Emits count 3D particles configured by config directly into the compacted SoA pool with zero heap allocations.
§Arguments
usize- Number of particles to emit.&NiagaraEmitterConfig3D- Emission origin, velocity, lifetime, and optical configuration.
Sourcepub fn update(&mut self, dt_secs: f32, ground_y: f32) -> usize
pub fn update(&mut self, dt_secs: f32, ground_y: f32) -> usize
Advances all active 3D particles by dt_secs with gravity, drag, curl-noise turbulence, and ground bounce, returning remaining active count.
§Arguments
f32- Simulation timestep in seconds.f32- Ground plane Y elevation in meters for bounce collision.
§Returns
usize- Remaining active particle count.
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears all live 3D particles in O(1) while retaining pre-allocated SoA capacities.
Sourcepub fn composite_depth_tested(
&self,
view_proj: &Mat4,
focal_px: f32,
dims: (usize, usize),
depth_buffer: &[f32],
rgba_out: &mut [u8],
) -> usize
pub fn composite_depth_tested( &self, view_proj: &Mat4, focal_px: f32, dims: (usize, usize), depth_buffer: &[f32], rgba_out: &mut [u8], ) -> usize
Projects and depth-tests all active 3D Niagara particles onto rgba_out using the reverse-Z depth_buffer, returning rendered particle count.
§Arguments
&Mat4- Active frame view-projection matrix.f32- Projected viewport focal length in pixels.(usize, usize)- Target framebuffer(width, height)in pixels.&[f32]- Reverse-Z1/wdepth buffer (0.0= sky, larger = nearer).&mut [u8]- Target RGBA8 framebuffer updated with depth-tested glowing billboards.
§Returns
usize- Number of visible 3D particles composited onto the framebuffer.
Source§impl NiagaraSystem3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl NiagaraSystem3D
Implements impl #impl_generics #name #ty_generics #where_clause.