C4 Engine
C4 Engine API Documentation

class ParticlePool

Defined in:  C4Particles.h
The ParticlePool class handles storage for particles in a particle system.
Definition

template <class type = Particle> class ParticlePool : public ParticlePoolBase

Member Functions
ParticlePool::NewParticle Returns an unused particle from a particle pool.
Template Parameters
type The structure containing the state data for each particle. This must be Particle or one of its subclasses.
Constructor

ParticlePool(int32 count, type *pool);

Parameters
count The total number of particles in the pool.
pool A pointer to an array of structures that hold the particle state data. This must point to an array of count structures of the type specified by the type template parameter.
Description
The ParticlePool class encapsulates an array of particle structures that are used with a single particle system. These structures hold the current state of all the particles in a particle system. A pointer to a particle pool is passed to the constructors of the various particle system subclasses.
Base Classes
ParticlePoolBase Used internally to encapsulate common functionality that is independent of the template parameter.
See Also

ParticleSystem

Particle