134 void set_lifetime(std::chrono::duration<float> lifetime);
135 auto get_lifetime()
const -> std::chrono::duration<float>;
209 bool enabled_ =
true;
218 uint32_t max_particles_ = 1024;
Component that wraps particle system emitter functionality.
auto get_texture() const -> const asset_handle< gfx::texture > &
void set_blend_multiplier(float multiplier)
auto get_size_by_speed_range() const -> const frange_t &
auto is_paused() const -> bool
void set_blend_gradient(const math::gradient< frange_t > &gradient)
auto get_temporal_motion() const -> float
void set_size_by_speed_range(const frange_t &size_range)
void set_color_by_speed_velocity_range(const frange_t &velocity_range)
void set_shape(EmitterShape::Enum shape)
Sets the emitter shape.
auto get_color_by_speed_velocity_range() const -> const frange_t &
void set_texture(const asset_handle< gfx::texture > &texture)
auto get_uniforms() const -> const EmitterUniforms &
Gets the emitter uniforms for direct access.
static void on_destroy_component(entt::registry &r, entt::entity e)
Called when the component is destroyed.
auto get_simulation_space() const -> SimulationSpace::Enum
void recreate_emitter()
Recreates the emitter with current shape and direction.
void set_lifetime(std::chrono::duration< float > lifetime)
auto get_max_particles() const -> uint32_t
Gets the maximum number of particles.
void update_emitter(const math::transform &world_transform, delta_t dt)
Updates the emitter with external transform data.
void set_color_by_speed_gradient(const math::gradient< math::color > &gradient)
auto is_loop() const -> bool
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_emission_shape_scale() const -> math::vec3
void set_enabled(bool enabled)
Sets whether the emitter is enabled.
void set_temporal_motion(float temporal_motion)
void set_direction(EmitterDirection::Enum direction)
Sets the emitter direction.
void set_simulation_space(SimulationSpace::Enum space)
auto get_emitter_handle() const -> EmitterHandle
Gets the emitter handle.
void reset_emitter()
Resets the emitter, clearing all particles and resetting internal state.
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)
auto get_shape() const -> EmitterShape::Enum
Gets the emitter shape.
void set_color_gradient(const math::gradient< math::color > &gradient)
auto is_enabled() const -> bool
Checks if the emitter is enabled.
auto get_direction() const -> EmitterDirection::Enum
Gets the emitter direction.
auto get_color_by_speed_gradient() const -> const math::gradient< math::color > &
auto get_velocity_gradient() const -> const math::gradient< frange_t > &
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_blend_multiplier() const -> float
void set_lifetime_by_emitter_speed_gradient(const math::gradient< float > &gradient)
void set_emission_lifetime(std::chrono::duration< float > lifetime)
auto get_velocity_damping() const -> float
void set_gravity_scale(float scale)
auto get_color_gradient() const -> const math::gradient< math::color > &
auto get_world_bounds() const -> math::bbox
auto get_blend_gradient() const -> const math::gradient< frange_t > &
auto get_size_by_speed_velocity_range() const -> const frange_t &
static void on_create_component(entt::registry &r, entt::entity e)
Called when the component is created.
auto get_emission_lifetime() const -> std::chrono::duration< float >
void set_lifetime_by_emitter_speed_range(const frange_t &speed_range)
auto get_gravity_scale() const -> float
void set_scale_gradient(const math::gradient< frange_t > &gradient)
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)
Sets the maximum number of particles.
std::chrono::duration< float > delta_t
Represents a handle to an asset, providing access and management functions.
Storage for box vector values and wraps up common functionality.
CRTP (Curiously Recurring Template Pattern) base structure for components.