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

Spawns spark bursts + impact flash quads on hit events. More...

#include <ImpactEffect.hpp>

Public Member Functions

void update (float dt)
 Advance spark physics and fade alpha over time.
 
void spawn (glm::vec3 pos, glm::vec3 normal, SurfaceType surface, float frameDt)
 Spawn 8-16 sparks + 1 flash at the impact point.
 
const BillboardParticledata () const
 
uint32_t count () const
 

Detailed Description

Spawns spark bursts + impact flash quads on hit events.

Member Function Documentation

◆ count()

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

◆ data()

const BillboardParticle * ImpactEffect::data ( ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn()

void ImpactEffect::spawn ( glm::vec3  pos,
glm::vec3  normal,
SurfaceType  surface,
float  frameDt 
)

Spawn 8-16 sparks + 1 flash at the impact point.

Parameters
posWorld-space impact position.
normalSurface normal at the impact point.
surfaceSurface material type controlling spark appearance.
frameDtCurrent frame delta time, used for single-frame flash lifetime.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void ImpactEffect::update ( float  dt)

Advance spark physics and fade alpha over time.

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: