|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
Abstract interface for a self-contained particle effect. More...
#include <flint/particles/particle-effect.h>
Collaboration diagram for Flint::ParticleEffect:Public Member Functions | |
| virtual void | update (float dt)=0 |
Advance the particle simulation by dt seconds. | |
| virtual void | render (GPURenderer &renderer, const Camera &cam, const Vec2i &screenSize)=0 |
| Submit particle draw calls to the renderer. | |
| virtual bool | isFinished () const =0 |
| Return true when the effect has emitted and faded all particles. | |
Abstract interface for a self-contained particle effect.
Implementations manage their own simulation state and GPU resources. The owner calls update() each frame followed by render() to display the effect. isFinished() can be polled to determine when the effect can be destroyed.
Definition at line 18 of file particle-effect.h.
|
pure virtual |
Return true when the effect has emitted and faded all particles.
Once this returns true the owner may safely destroy this object.
|
pure virtual |
Submit particle draw calls to the renderer.
| renderer | GPU renderer that will execute the draw commands. |
| cam | Camera used to transform particles to screen space. |
| screenSize | Logical render-target size in pixels. |
|
pure virtual |
Advance the particle simulation by dt seconds.
| dt | Delta time since the last frame, in seconds. |