Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::ps_soa::emitter_sim_state Struct Reference

Mutable simulation bookkeeping owned by the soa emitter instance. More...

#include <emitter_runtime.h>

Public Member Functions

void reset ()
 
void push_temporal_sample (const math::vec3 &position, float dt)
 
auto calculate_smoothed_emitter_speed (float max_speed) const -> float
 

Public Attributes

float emission_time_accum = 0.0f
 
float start_delay_elapsed = 0.0f
 
uint32_t total_particles_spawned = 0
 
bool first_update = true
 
bool playing = true
 
bool loop = true
 
emitter_feature features = emitter_feature::none
 
std::array< math::vec3, temporal_buffer_sizetemporal_positions {}
 
std::array< float, temporal_buffer_sizetemporal_dts {}
 
uint32_t temporal_count = 0
 
math::bbox world_bounds {math::vec3(-1.0f), math::vec3(1.0f)}
 

Static Public Attributes

static constexpr size_t temporal_buffer_size = 8
 

Detailed Description

Mutable simulation bookkeeping owned by the soa emitter instance.

Definition at line 30 of file emitter_runtime.h.

Member Function Documentation

◆ calculate_smoothed_emitter_speed()

auto unravel::ps_soa::emitter_sim_state::calculate_smoothed_emitter_speed ( float max_speed) const -> float

Definition at line 160 of file emitter_desc.cpp.

◆ push_temporal_sample()

void unravel::ps_soa::emitter_sim_state::push_temporal_sample ( const math::vec3 & position,
float dt )

Definition at line 142 of file emitter_desc.cpp.

◆ reset()

void unravel::ps_soa::emitter_sim_state::reset ( )

Definition at line 127 of file emitter_desc.cpp.

Member Data Documentation

◆ emission_time_accum

float unravel::ps_soa::emitter_sim_state::emission_time_accum = 0.0f

Definition at line 34 of file emitter_runtime.h.

◆ features

emitter_feature unravel::ps_soa::emitter_sim_state::features = emitter_feature::none

Definition at line 40 of file emitter_runtime.h.

◆ first_update

bool unravel::ps_soa::emitter_sim_state::first_update = true

Definition at line 37 of file emitter_runtime.h.

◆ loop

bool unravel::ps_soa::emitter_sim_state::loop = true

Definition at line 39 of file emitter_runtime.h.

◆ playing

bool unravel::ps_soa::emitter_sim_state::playing = true

Definition at line 38 of file emitter_runtime.h.

◆ start_delay_elapsed

float unravel::ps_soa::emitter_sim_state::start_delay_elapsed = 0.0f

Definition at line 35 of file emitter_runtime.h.

◆ temporal_buffer_size

size_t unravel::ps_soa::emitter_sim_state::temporal_buffer_size = 8
staticconstexpr

Definition at line 32 of file emitter_runtime.h.

◆ temporal_count

uint32_t unravel::ps_soa::emitter_sim_state::temporal_count = 0

Definition at line 44 of file emitter_runtime.h.

◆ temporal_dts

std::array<float, temporal_buffer_size> unravel::ps_soa::emitter_sim_state::temporal_dts {}

Definition at line 43 of file emitter_runtime.h.

◆ temporal_positions

std::array<math::vec3, temporal_buffer_size> unravel::ps_soa::emitter_sim_state::temporal_positions {}

Definition at line 42 of file emitter_runtime.h.

◆ total_particles_spawned

uint32_t unravel::ps_soa::emitter_sim_state::total_particles_spawned = 0

Definition at line 36 of file emitter_runtime.h.

◆ world_bounds

math::bbox unravel::ps_soa::emitter_sim_state::world_bounds {math::vec3(-1.0f), math::vec3(1.0f)}

Definition at line 46 of file emitter_runtime.h.


The documentation for this struct was generated from the following files: