Facebook Twitter YouTube

class ParticlePool

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

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.

ParticlePool(int32 count, type *pool);

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.
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