C4 Engine
C4 Engine API Documentation

class ParticleSystem

Defined in:  C4Particles.h
The ParticleSystem class represents a particle system node in a world.
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::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);

Parameters
type The type of particle system.
pool The particle pool from which this effect creates particles.
textureName The name of the texture map to use. If this is nullptr, then the default particle texture is used.
Description
The ParticleSystem class is the base class for all types of particle-based effects. A custom particle system is defined by creating a subclass of one of the more specific subclasses of the ParticleSystem class.
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 widgets in the World Editor.
See Also

Particle

ParticlePool

PointParticleSystem

TexcoordPointParticleSystem

InfinitePointParticleSystem

LineParticleSystem

QuadParticleSystem

PolyboardParticleSystem

FireParticleSystem

BlobParticleSystem