group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
SmokeEffect Class Reference

Manages volumetric smoke billboard particles. More...

#include <SmokeEffect.hpp>

Public Member Functions

void update (float dt, Registry &registry, 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 SmokeParticledata () const
 
uint32_t count () const
 

Detailed Description

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.

Member Function Documentation

◆ count()

uint32_t SmokeEffect::count ( ) const
inline
Here is the caller graph for this function:

◆ data()

const SmokeParticle * SmokeEffect::data ( ) const
inline
Here is the caller graph for this function:

◆ 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
posWorld-space center of the smoke cluster.
radiusSpread radius for particle placement.
isFireIf true, spawn fire-colored particles instead of grey smoke.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void SmokeEffect::update ( float  dt,
Registry registry,
glm::vec3  camPos,
glm::vec3  camForward 
)

Simulate particles, drive continuous emitters, and sort for rendering.

Parameters
dtFrame delta time in seconds.
registryECS registry containing ParticleEmitterTag entities.
camPosWorld-space camera position for depth sorting.
camForwardCamera forward vector for depth sorting.
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: