ParticleEmitter Class Reference

#include <particleemitter.h>

List of all members.


Detailed Description

Every Particle can have one or more particle emitters that create new particles when they are updated.

Definition at line 41 of file particleemitter.h.


Public Member Functions

 ParticleEmitter (xmlNodePtr emitterNode, Particle *target, Map *map, int rotation=0)
 Constructor.
 ParticleEmitter (const ParticleEmitter &o)
 Copy Constructor (necessary for reference counting of particle images).
ParticleEmitteroperator= (const ParticleEmitter &o)
 Assignment operator that calls the copy constructor.
 ~ParticleEmitter ()
 Destructor.
std::list< Particle * > createParticles (int tick)
 Spawns new particles.
void setTarget (Particle *target)
 Sets the target of the particles that are created.

Private Member Functions

template<typename T>
ParticleEmitterProp< T > readParticleEmitterProp (xmlNodePtr propertyNode, T def)

Private Attributes

ParticleEmitterProp< float > mParticlePosX
 initial position of particles:
ParticleEmitterProp< float > mParticlePosY
ParticleEmitterProp< float > mParticlePosZ
ParticleEmitterProp< float > mParticleAngleHorizontal
 initial vector of particles:
ParticleEmitterProp< float > mParticleAngleVertical
ParticleEmitterProp< float > mParticlePower
 Initial velocity of particles.
ParticleEmitterProp< float > mParticleGravity
ParticleEmitterProp< int > mParticleRandomness
ParticleEmitterProp< float > mParticleBounce
bool mParticleFollow
ParticlemParticleTarget
ParticleEmitterProp< float > mParticleAcceleration
ParticleEmitterProp< float > mParticleDieDistance
ParticleEmitterProp< float > mParticleMomentum
ParticleEmitterProp< int > mParticleLifetime
ParticleEmitterProp< int > mParticleFadeOut
ParticleEmitterProp< int > mParticleFadeIn
MapmMap
 Map the particles are spawned on.
ParticleEmitterProp< int > mOutput
 Number of particles spawned per update.
ParticleEmitterProp< int > mOutputPause
 Pause in frames between two spawns.
int mOutputPauseLeft
ImagemParticleImage
 Particle image, if used.
Animation mParticleAnimation
 Filename of particle animation file.
ParticleEmitterProp< float > mParticleAlpha
 Opacity of the graphical representation of the particles.
std::list< ParticleEmittermParticleChildEmitters
 List of emitters the spawned particles are equipped with.

Constructor & Destructor Documentation

ParticleEmitter::ParticleEmitter ( xmlNodePtr  emitterNode,
Particle target,
Map map,
int  rotation = 0 
)

Constructor.

Definition at line 37 of file particleemitter.cpp.

ParticleEmitter::ParticleEmitter ( const ParticleEmitter o  ) 

Copy Constructor (necessary for reference counting of particle images).

Definition at line 258 of file particleemitter.cpp.

ParticleEmitter::~ParticleEmitter (  ) 

Destructor.

Definition at line 298 of file particleemitter.cpp.


Member Function Documentation

ParticleEmitter & ParticleEmitter::operator= ( const ParticleEmitter o  ) 

Assignment operator that calls the copy constructor.

Definition at line 263 of file particleemitter.cpp.

std::list< Particle * > ParticleEmitter::createParticles ( int  tick  ) 

Spawns new particles.

Returns:
: a list of created particles

Definition at line 331 of file particleemitter.cpp.

void ParticleEmitter::setTarget ( Particle target  )  [inline]

Sets the target of the particles that are created.

Definition at line 73 of file particleemitter.h.

template<typename T>
ParticleEmitterProp< T > ParticleEmitter::readParticleEmitterProp ( xmlNodePtr  propertyNode,
def 
) [inline, private]

Definition at line 305 of file particleemitter.cpp.


Member Data Documentation

initial position of particles:

Definition at line 82 of file particleemitter.h.

Definition at line 82 of file particleemitter.h.

Definition at line 82 of file particleemitter.h.

initial vector of particles:

Definition at line 87 of file particleemitter.h.

Definition at line 87 of file particleemitter.h.

Initial velocity of particles.

Definition at line 92 of file particleemitter.h.

Definition at line 97 of file particleemitter.h.

Definition at line 98 of file particleemitter.h.

Definition at line 99 of file particleemitter.h.

Definition at line 100 of file particleemitter.h.

Definition at line 105 of file particleemitter.h.

Definition at line 106 of file particleemitter.h.

Definition at line 107 of file particleemitter.h.

Definition at line 108 of file particleemitter.h.

Definition at line 113 of file particleemitter.h.

Definition at line 114 of file particleemitter.h.

Definition at line 115 of file particleemitter.h.

Map the particles are spawned on.

Definition at line 117 of file particleemitter.h.

Number of particles spawned per update.

Definition at line 119 of file particleemitter.h.

Pause in frames between two spawns.

Definition at line 120 of file particleemitter.h.

Definition at line 121 of file particleemitter.h.

Particle image, if used.

Definition at line 126 of file particleemitter.h.

Filename of particle animation file.

Definition at line 127 of file particleemitter.h.

Opacity of the graphical representation of the particles.

Definition at line 128 of file particleemitter.h.

List of emitters the spawned particles are equipped with.

Definition at line 131 of file particleemitter.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5