Polycode
|
3D particle emitter. More...
Inherits Polycode::SceneEntity, and Polycode::ParticleEmitter.
Public Member Functions | |
SceneParticleEmitter (const String &materialName, Scene *particleParentScene, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Vector3 emitterRadius, Mesh *particleMesh=NULL, SceneMesh *emitter=NULL) | |
Constructor. | |
ParticleEmitter * | getEmitter () |
Returns the emitter (helper method for LUA). | |
void | Update () |
Main update method. |
3D particle emitter.
SceneParticleEmitter::SceneParticleEmitter | ( | const String & | materialName, |
Scene * | particleParentScene, | ||
int | particleType, | ||
int | emitterType, | ||
Number | lifespan, | ||
unsigned int | numParticles, | ||
Vector3 | direction, | ||
Vector3 | gravity, | ||
Vector3 | deviation, | ||
Vector3 | emitterRadius, | ||
Mesh * | particleMesh = NULL , |
||
SceneMesh * | emitter = NULL |
||
) |
Constructor.
materialName | Name of the material to use for particles. |
particleParentScene | Scene to create particles in. |
particleType | Type of particles to create. Can be Particle::BILLBOARD_PARTICLE or Particle::MESH_PARTICLE |
emitterType | Type of emitter to create. Can be ParticleEmitter::CONTINUOUS_EMITTER or ParticleEmitter::TRIGGERED_EMITTER |
lifespan | Lifetime of particles in seconds. |
numParticles | Total number of particles to create. |
direction | Direction of the emitter, length of this vector controls emitter strength |
gravity | Gravity direction and strength |
deviation | Emitter deviation on each axis |
particleMesh | If particle type is Particle::MESH_PARTICLE, this must be set to the mesh to use for each particle |
emitter | If this is specified, particles will be emitted from this meshe's vertices. |
void SceneParticleEmitter::Update | ( | ) | [virtual] |
Main update method.
Override this to do your updates before the render cycle.
Reimplemented from Polycode::Entity.