61 void Clear() { m_particles.clear(); }
63 [[nodiscard]] std::size_t
GetAliveCount()
const {
return m_particles.size(); }
65 [[nodiscard]] std::size_t
GetCapacity()
const {
return m_capacity; }
69 [[nodiscard]]
bool IsPaused()
const {
return m_paused; }
72 std::shared_ptr<Mesh> m_quad;
73 std::shared_ptr<ShaderProgram> m_shader;
74 std::vector<Particle> m_particles;
75 std::size_t m_capacity = 4096;
76 bool m_paused =
false;
std::size_t GetCapacity() const
void Update(f32 deltaTime)
Step every live particle, swap-erase dead ones.
std::size_t GetAliveCount() const
void Spawn(const Particle &particle)
Push a fully-configured particle into the pool. Drops oldest if full.
void SetPaused(bool paused)
void Render(const CameraData &cameraData)
Camera-aligned billboard pass. Call after the lit pass, before UI.
vec3 acceleration
World-space gravity / drag, applied each frame.