ParticleSystem< MaxParticles, InitPolicy, UpdatePolicy, EmitPolicy, DrawPolicy, ParticleType > Class Template Reference
The base class for spawning and managing particles.
More...
#include <Graphics/ParticleSystem.h>
List of all members.
Detailed Description
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
class ParticleSystem< MaxParticles, InitPolicy, UpdatePolicy, EmitPolicy, DrawPolicy, ParticleType >
The base class for spawning and managing particles.
- Template Parameters:
-
| MaxParticles | the maximum number of particles that can be active in the particle system. |
| InitPolicy | the Policy used to initialize new particles. |
| UpdatePolicy | the Policy used on each active particle during an update. |
| EmitPolicy | the policy used for emitting particles on each update, expected to have the same methods as the DefaultEmitPolicy class. |
| DrawPolicy | the policy used for drawing the particles, expected to have the same methods as the DefaultParticleDrawPolicy class. |
| ParticleType | the type of particle to use in the particle system. The ParticleType is expected to inheret from the Particle class (or at least have duplicate members). |
Member Function Documentation
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
Emits the requested number of particles at the given position.
- Parameters:
-
[in] | pos | the position to emit the particles. |
[in] | amt | the number of particles to emit. NOTE: The particle system will only emit particles if the number of active particles is less then MaxParticles. |
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
- Returns:
- The maximum number of active particles the system can handle.
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
Determines the total number of active particles in the system.
- Returns:
- The number of active particles.
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
Updates the particle system.
- Parameters:
-
[in] | dt | the time in seconds since the last frame. |
Member Data Documentation
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
The initialization policy
template<uint MaxParticles, class InitPolicy, class UpdatePolicy, class EmitPolicy = DefaultEmitPolicy<>, class DrawPolicy = DefaultParticleDrawPolicy, class ParticleType = Particle>
The documentation for this class was generated from the following file: