#include <particle.h>
Inheritance diagram for ParticleGenerator:
Public Member Functions | |
ParticleGenerator (float fVelocity, float fVelocityAccuracy, float fDensity, ParticleAllocatorCallback *pkAllocatorCallback=0) | |
virtual | ~ParticleGenerator () |
virtual unsigned int | Generate (float fDeltaTime, unsigned int uiMaxParticles, Particle **ppkParticles, const Vector3d &kPos)=0 |
Protected Member Functions | |
virtual void | Allocate (unsigned int uiNumParticles, Particle **ppkParticles) |
Protected Attributes | |
float | m_fFraction |
float | m_fVelocity |
float | m_fVelocityAccuracy |
float | m_fDensity |
ParticleAllocatorCallback * | m_pkAllocatorCallback |
|
|
|
|
|
Allocate new particles
|
|
Implement for specific generator
Implemented in SphereParticleGenerator. |
|
Fraction part of last generation (if a Generate call produces 0.9 particles, we want to store this to next call) |
|
Initial velocity of new particles |
|
Accuracy of initial velocity |
|
Density (particles per second we will generate) |
|
Allocation callback. Will be called for each new particle this generator allocates |