Manages volumetric smoke billboard particles.
More...
#include <SmokeEffect.hpp>
|
| void | update (float dt, Registry ®istry, glm::vec3 camPos, glm::vec3 camForward) |
| | Simulate particles, drive continuous emitters, and sort for rendering.
|
| |
| void | spawn (glm::vec3 pos, float radius, bool isFire=false) |
| | Spawn a cluster of smoke puffs at pos with the given radius.
|
| |
| const SmokeParticle * | data () const |
| |
| uint32_t | count () const |
| |
Manages volumetric smoke billboard particles.
Provides spawn() for one-shot smoke puffs and also drives ParticleEmitterTag entities continuously in update().
Particles are sorted back-to-front before upload for correct alpha blending.
◆ count()
| uint32_t SmokeEffect::count |
( |
| ) |
const |
|
inline |
◆ data()
◆ spawn()
| void SmokeEffect::spawn |
( |
glm::vec3 |
pos, |
|
|
float |
radius, |
|
|
bool |
isFire = false |
|
) |
| |
Spawn a cluster of smoke puffs at pos with the given radius.
- Parameters
-
| pos | World-space center of the smoke cluster. |
| radius | Spread radius for particle placement. |
| isFire | If true, spawn fire-colored particles instead of grey smoke. |
◆ update()
| void SmokeEffect::update |
( |
float |
dt, |
|
|
Registry & |
registry, |
|
|
glm::vec3 |
camPos, |
|
|
glm::vec3 |
camForward |
|
) |
| |
Simulate particles, drive continuous emitters, and sort for rendering.
- Parameters
-
| dt | Frame delta time in seconds. |
| registry | ECS registry containing ParticleEmitterTag entities. |
| camPos | World-space camera position for depth sorting. |
| camForward | Camera forward vector for depth sorting. |
The documentation for this class was generated from the following files: