45 auto
get_shape() const -> ps_soa::emitter_shape;
184 auto
get_desc() const -> const ps_soa::emitter_desc&;
190 bool enabled_ = true;
192 uint64_t last_render_frame_ = 0;
193 ps_soa::emitter_shape shape_ = ps_soa::emitter_shape::
sphere;
194 ps_soa::emitter_direction direction_ = ps_soa::emitter_direction::up;
195 uint32_t max_particles_ = 1024;
196 ps_soa::particle_sim_backend simulation_backend_ = ps_soa::particle_sim_backend::cpu;
197 ps_soa::emitter_handle emitter_handle_{};
198 ps_soa::emitter_desc desc_{};
199 ps_soa::emitter_transform_state transform_state_{};
Component that wraps the soa particle system emitter.
auto get_texture() const -> const asset_handle< gfx::texture > &
auto get_desc() const -> const ps_soa::emitter_desc &
void set_align_to_direction(bool align)
auto get_size_by_speed_range() const -> const frange_t &
auto is_newly_created() const noexcept -> bool
auto is_paused() const -> bool
auto get_temporal_motion() const -> float
void set_size_by_speed_range(const frange_t &size_range)
auto get_emission_shape_position() const -> math::vec3
void set_color_by_speed_velocity_range(const frange_t &velocity_range)
auto get_pivot() const -> math::vec2
auto get_culling_mode() const -> culling_mode
auto get_color_by_speed_velocity_range() const -> const frange_t &
void set_texture(const asset_handle< gfx::texture > &texture)
void set_texture_sheet_tiles(math::vec2 tiles)
void set_start_delay(std::chrono::duration< float > delay)
static void on_destroy_component(entt::registry &r, entt::entity e)
auto get_shape() const -> ps_soa::emitter_shape
auto get_emitter_handle() const -> ps_soa::emitter_handle
void set_spawn_location(ps_soa::spawn_location spawn_location)
auto get_render_mode() const -> ps_soa::render_mode
auto get_blend_mode() const -> ps_soa::blend_mode
void set_texture_sheet_cycles(float cycles)
auto get_start_delay() const -> std::chrono::duration< float >
void set_opacity(float opacity)
void set_lifetime(std::chrono::duration< float > lifetime)
void set_render_mode(ps_soa::render_mode mode)
auto get_max_particles() const -> uint32_t
void update_emitter(const math::transform &world_transform, delta_t dt)
void set_texture_sheet_randomize(bool randomize)
void set_simulation_space(ps_soa::simulation_space space)
void set_color_by_speed_gradient(const math::gradient< math::color > &gradient)
auto is_loop() const -> bool
auto get_initial_scale_3d() const -> math::vec3
auto get_lifetime_by_emitter_speed_gradient() const -> const math::gradient< float > &
void set_size_by_speed_velocity_range(const frange_t &velocity_range)
auto get_texture_sheet_tiles() const -> math::vec2
auto get_emission_shape_scale() const -> math::vec3
auto get_texture_sheet_randomize() const -> bool
void set_enabled(bool enabled)
void set_temporal_motion(float temporal_motion)
void set_initial_scale_3d(const math::vec3 &scale)
auto get_texture_mode() const -> ps_soa::texture_mode
auto was_used_last_frame() const noexcept -> bool
void set_simulation_backend(ps_soa::particle_sim_backend backend)
CPU vs GPU particle pack/sim path for this emitter (artist-selectable).
void set_position_easing(bx::Easing::Enum easing)
auto get_scale_gradient() const -> const math::gradient< frange_t > &
void set_velocity_damping(float velocity_damping)
void set_velocity_gradient(const math::gradient< frange_t > &gradient)
void set_force_over_lifetime(const math::vec3 &force)
void set_emission_shape_scale(const math::vec3 &scale)
void set_blend_mode(ps_soa::blend_mode mode)
void set_color_gradient(const math::gradient< math::color > &gradient)
auto is_enabled() const -> bool
void set_texture_mode(ps_soa::texture_mode mode)
auto get_color_by_speed_gradient() const -> const math::gradient< math::color > &
void set_last_render_frame(uint64_t frame)
auto get_velocity_gradient() const -> const math::gradient< frange_t > &
auto get_align_to_direction() const -> bool
void set_emission_rate(float emission_rate)
auto is_playing() const -> bool
auto get_lifetime() const -> std::chrono::duration< float >
auto get_updated_world_bounds(const math::transform &world_transform) const -> math::bbox
auto get_force_over_lifetime() const -> math::vec3
auto get_direction() const -> ps_soa::emitter_direction
auto is_stopped() const -> bool
void set_lifetime_by_emitter_speed_gradient(const math::gradient< float > &gradient)
auto get_color_intensity() const -> float
void set_emission_lifetime(std::chrono::duration< float > lifetime)
void resume_sub_emitters()
auto get_velocity_damping() const -> float
auto get_simulation_space() const -> ps_soa::simulation_space
void set_gravity_scale(float scale)
void set_shape(ps_soa::emitter_shape shape)
auto get_color_gradient() const -> const math::gradient< math::color > &
auto get_simulation_backend() const -> ps_soa::particle_sim_backend
void set_color_intensity(float intensity)
auto get_world_bounds() const -> math::bbox
void set_culling_mode(culling_mode mode)
auto get_size_by_speed_velocity_range() const -> const frange_t &
auto get_spawn_location() const -> ps_soa::spawn_location
static void on_create_component(entt::registry &r, entt::entity e)
auto get_emission_lifetime() const -> std::chrono::duration< float >
void set_lifetime_by_emitter_speed_range(const frange_t &speed_range)
void pause_sub_emitters()
void set_pivot(const math::vec2 &pivot)
auto get_gravity_scale() const -> float
void set_emission_shape_position(const math::vec3 &position)
auto get_texture_sheet_cycles() const -> float
void stop_and_reset_sub_emitters()
auto get_last_render_frame() const noexcept -> uint64_t
auto get_opacity() const -> float
void set_scale_gradient(const math::gradient< frange_t > &gradient)
void set_direction(ps_soa::emitter_direction direction)
auto get_num_particles() const -> uint32_t
auto get_position_easing() const -> bx::Easing::Enum
auto get_lifetime_by_emitter_speed_range() const -> const frange_t &
auto get_emission_rate() const -> float
void set_max_particles(uint32_t max_particles)
std::chrono::duration< float > delta_t
Hash specialization for batch_key to enable use in std::unordered_map.
@ sphere
Sphere type reflection probe.
std::vector< math::color > color
std::vector< float > scale
Thread-safe handle to an asset.
CRTP (Curiously Recurring Template Pattern) base structure for components.