C4 Engine Terathon Software C4 Engine API Documentation

• Effect Manager

API Links
Developer Links

class ParticleSystem

Defined in:  C4Particles.h
The ParticleSystem class represents a particle system node in a scene graph.
Definition

class ParticleSystem : public Effect, public Registrable<ParticleSystem, ParticleSystemRegistration>

Member Functions
ParticleSystem::GetParticleSystemType Returns the particle system type.
ParticleSystem::GetParticleSystemFlags Returns the particle system flags.
ParticleSystem::SetParticleSystemFlags Sets the particle system flags.
ParticleSystem::GetParticleStyle Returns the particle style.
ParticleSystem::GetFirstParticle Returns the first particle in a particle system.
ParticleSystem::GetLastParticle Returns the last particle in a particle system.
ParticleSystem::AddParticle Adds a new particle to a particle system.
ParticleSystem::AddFarthestParticle Adds a new particle to a particle system and makes it first to render.
ParticleSystem::FreeParticle Removes a particle from a particle system.
ParticleSystem::AnimateParticles Called once per frame to update the positions of the particles.
Constructor

ParticleSystem(ParticleSystemType type, ParticlePoolBase *pool, ParticleStyle style = kParticlePoint,

const char *textureName = nullptr);

The constructor has protected access. The ParticleSystem class can only exist as the base class for a more specific type of particle effect.
Parameters
type The type of particle system.
pool The particle pool from which this effect creates particles.
style The particle style. The available styles are listed below.
textureName The name of the texture map to use. If this is nullptr, then the default particle texture is used.
Description
kParticlePoint Render particles as points.
kParticleLine Render particles as lines along their current velocity vectors.
kParticleQuad Render particles as oriented quads. (The particle type must be derived from QuadParticle.)
kParticlePolyboard Render particles as polyboards connecting to other particles. (The particle type must be derived from PolyParticle.)
Base Classes
Effect A ParticleSystem node is a specific type of Effect.
Registrable<ParticleSystem, ParticleSystemRegistration> Custom particle system types can be registered with the engine.
Configurable Particle systems can define configurable parameters that are exposed as user interface elements in the World Editor.
See Also
ParticlePool

Particle