Skip to main content

NiagaraSystem3D

Struct NiagaraSystem3D 

Source
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.

Source

pub fn with_capacity(capacity: usize) -> Self

Constructs a pre-allocated NiagaraSystem3D sized for capacity live 3D particles with zero runtime heap allocations.

§Arguments
  • usize - Maximum concurrent 3D particle slots (>= 16).
§Returns
  • Self - Pre-allocated 3D Niagara particle pool.
Source

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.
Source

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.
Source

pub fn clear(&mut self)

Clears all live 3D particles in O(1) while retaining pre-allocated SoA capacities.

Source

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-Z 1/w depth 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

Source

pub fn get_capacity(&self) -> usize

Source

pub fn get_mut_capacity(&mut self) -> &mut usize

Source

pub fn set_capacity(&mut self, val: usize) -> &mut Self

Source

pub fn get_active_count(&self) -> usize

Source

pub fn get_mut_active_count(&mut self) -> &mut usize

Source

pub fn set_active_count(&mut self, val: usize) -> &mut Self

Source

pub fn get_gravity(&self) -> Vec3

Source

pub fn get_mut_gravity(&mut self) -> &mut Vec3

Source

pub fn set_gravity(&mut self, val: Vec3) -> &mut Self

Source

pub fn get_sim_time_secs(&self) -> f32

Source

pub fn get_mut_sim_time_secs(&mut self) -> &mut f32

Source

pub fn set_sim_time_secs(&mut self, val: f32) -> &mut Self

Trait Implementations§

Source§

impl Clone for NiagaraSystem3D

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NiagaraSystem3D

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NiagaraSystem3D

Default 2,048-slot NiagaraSystem3D.

Source§

fn default() -> Self

Creates a pre-allocated 2,048-slot NiagaraSystem3D with Earth gravity.

§Returns
  • Self - Ready zero-allocation 3D particle system.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.