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

Owns the new explosion VFX path for rockets, frags, stickies, and molotovs. More...

#include <ExplosionVfxEffect.hpp>

Collaboration diagram for ExplosionVfxEffect:
[legend]

Classes

struct  GroundFireAnchor

Public Member Functions

void update (float dt, Registry &registry, glm::vec3 camPos, glm::vec3 camForward)
 Advance all active explosion VFX and persistent ground fire anchors.
void spawn (glm::vec3 pos, glm::vec3 normal, float radius, ExplosionVfxKind kind)
 Spawn a one-shot explosion burst.
void driveGroundFire (entt::entity fieldEntity, glm::vec3 pos, float radius, float remaining, float duration)
 Drive persistent molotov ground-fire visuals from a replicated FireField.
const VfxSpriteParticlespriteData () const
uint32_t spriteCount () const
const VfxDebrisParticledebrisData () const
uint32_t debrisCount () const

Private Member Functions

void spawnSprite (glm::vec3 pos, glm::vec3 vel, float size, glm::vec4 color, float lifetime, float growthRate, float spinRate, float rotation, int frameStart, int frameCount, float fps, int material, float stretch, float softness, float priority)
void spawnDebris (glm::vec3 pos, glm::vec3 vel, float size, glm::vec4 color, float lifetime, float gravity, float drag, float stretch)
void spawnRocket (glm::vec3 pos, glm::vec3 normal, float radius)
void spawnFrag (glm::vec3 pos, glm::vec3 normal, float radius)
void spawnSticky (glm::vec3 pos, glm::vec3 normal, float radius)
void spawnMolotovBurst (glm::vec3 pos, glm::vec3 normal, float radius)
void tickGroundFire (GroundFireAnchor &anchor, float dt)
uint32_t nextSeed ()

Private Attributes

ParticlePool< VfxSpriteParticle, 2048 > spritePool_
ParticlePool< VfxDebrisParticle, 1024 > debrisPool_
std::vector< VfxSpriteParticlesortedSprites_
std::vector< GroundFireAnchorgroundFire_
uint32_t sequence_ = 1

Detailed Description

Owns the new explosion VFX path for rockets, frags, stickies, and molotovs.

This system intentionally does not call ExplosionEffect or SmokeEffect. Fire, smoke, dust, shock rings, embers, debris, scorch decals, and molotov ground flames are authored here as typed layers.

Member Function Documentation

◆ debrisCount()

uint32_t ExplosionVfxEffect::debrisCount ( ) const
inlinenodiscard

◆ debrisData()

const VfxDebrisParticle * ExplosionVfxEffect::debrisData ( ) const
inlinenodiscard

◆ driveGroundFire()

void ExplosionVfxEffect::driveGroundFire ( entt::entity fieldEntity,
glm::vec3 pos,
float radius,
float remaining,
float duration )

Drive persistent molotov ground-fire visuals from a replicated FireField.

Here is the call graph for this function:

◆ nextSeed()

uint32_t ExplosionVfxEffect::nextSeed ( )
inlinenodiscardprivate
Here is the caller graph for this function:

◆ spawn()

void ExplosionVfxEffect::spawn ( glm::vec3 pos,
glm::vec3 normal,
float radius,
ExplosionVfxKind kind )

Spawn a one-shot explosion burst.

Here is the call graph for this function:

◆ spawnDebris()

void ExplosionVfxEffect::spawnDebris ( glm::vec3 pos,
glm::vec3 vel,
float size,
glm::vec4 color,
float lifetime,
float gravity,
float drag,
float stretch )
private
Here is the caller graph for this function:

◆ spawnFrag()

void ExplosionVfxEffect::spawnFrag ( glm::vec3 pos,
glm::vec3 normal,
float radius )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawnMolotovBurst()

void ExplosionVfxEffect::spawnMolotovBurst ( glm::vec3 pos,
glm::vec3 normal,
float radius )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawnRocket()

void ExplosionVfxEffect::spawnRocket ( glm::vec3 pos,
glm::vec3 normal,
float radius )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawnSprite()

void ExplosionVfxEffect::spawnSprite ( glm::vec3 pos,
glm::vec3 vel,
float size,
glm::vec4 color,
float lifetime,
float growthRate,
float spinRate,
float rotation,
int frameStart,
int frameCount,
float fps,
int material,
float stretch,
float softness,
float priority )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawnSticky()

void ExplosionVfxEffect::spawnSticky ( glm::vec3 pos,
glm::vec3 normal,
float radius )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spriteCount()

uint32_t ExplosionVfxEffect::spriteCount ( ) const
inlinenodiscard

◆ spriteData()

const VfxSpriteParticle * ExplosionVfxEffect::spriteData ( ) const
inlinenodiscard

◆ tickGroundFire()

void ExplosionVfxEffect::tickGroundFire ( GroundFireAnchor & anchor,
float dt )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

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

Advance all active explosion VFX and persistent ground fire anchors.

Here is the call graph for this function:

Member Data Documentation

◆ debrisPool_

ParticlePool<VfxDebrisParticle, 1024> ExplosionVfxEffect::debrisPool_
private

◆ groundFire_

std::vector<GroundFireAnchor> ExplosionVfxEffect::groundFire_
private

◆ sequence_

uint32_t ExplosionVfxEffect::sequence_ = 1
private

◆ sortedSprites_

std::vector<VfxSpriteParticle> ExplosionVfxEffect::sortedSprites_
private

◆ spritePool_

ParticlePool<VfxSpriteParticle, 2048> ExplosionVfxEffect::spritePool_
private

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