Ogre::ParticleEmitter Class Reference

Abstract class defining the interface to be implemented by particle emitters. More...

#include <OgreParticleEmitter.h>

Inheritance diagram for Ogre::ParticleEmitter:

Inheritance graph
[legend]

List of all members.

Public Types

enum  ParticleType { Visual, Emitter }
 Type of particle. More...

Public Member Functions

 ParticleEmitter (ParticleSystem *psys)
virtual ~ParticleEmitter ()
 Virtual destructor essential.
virtual void setPosition (const Vector3 &pos)
 Sets the position of this emitter relative to the particle system center.
virtual const Vector3getPosition (void) const
 Returns the position of this emitter relative to the center of the particle system.
virtual void setDirection (const Vector3 &direction)
 Sets the direction of the emitter.
virtual const Vector3getDirection (void) const
 Returns the base direction of the emitter.
virtual void setAngle (const Radian &angle)
 Sets the maximum angle away from the emitter direction which particle will be emitted.
virtual const RadiangetAngle (void) const
 Returns the maximum angle which the initial particle direction can deviate from the emitters base direction.
virtual void setParticleVelocity (Real speed)
 Sets the initial velocity of particles emitted.
virtual void setParticleVelocity (Real min, Real max)
 Sets the initial velocity range of particles emitted.
virtual void setMinParticleVelocity (Real min)
 Returns the minimum particle velocity.
virtual void setMaxParticleVelocity (Real max)
 Returns the maximum particle velocity.
virtual Real getParticleVelocity (void) const
 Returns the initial velocity of particles emitted.
virtual Real getMinParticleVelocity (void) const
 Returns the minimum particle velocity.
virtual Real getMaxParticleVelocity (void) const
 Returns the maximum particle velocity.
virtual void setEmissionRate (Real particlesPerSecond)
 Sets the emission rate for this emitter.
virtual Real getEmissionRate (void) const
 Returns the emission rate set for this emitter.
virtual void setTimeToLive (Real ttl)
 Sets the lifetime of all particles emitted.
virtual void setTimeToLive (Real minTtl, Real maxTtl)
 Sets the range of lifetime for particles emitted.
virtual void setMinTimeToLive (Real min)
 Sets the minimum time each particle will live for.
virtual void setMaxTimeToLive (Real max)
 Sets the maximum time each particle will live for.
virtual Real getTimeToLive (void) const
 Gets the time each particle will live for.
virtual Real getMinTimeToLive (void) const
 Gets the minimum time each particle will live for.
virtual Real getMaxTimeToLive (void) const
 Gets the maximum time each particle will live for.
virtual void setColour (const ColourValue &colour)
 Sets the initial colour of particles emitted.
virtual void setColour (const ColourValue &colourStart, const ColourValue &colourEnd)
 Sets the range of colours for emitted particles.
virtual void setColourRangeStart (const ColourValue &colour)
 Sets the minimum colour of particles to be emitted.
virtual void setColourRangeEnd (const ColourValue &colour)
 Sets the maximum colour of particles to be emitted.
virtual const
ColourValue
getColour (void) const
 Gets the colour of particles to be emitted.
virtual const
ColourValue
getColourRangeStart (void) const
 Gets the minimum colour of particles to be emitted.
virtual const
ColourValue
getColourRangeEnd (void) const
 Gets the maximum colour of particles to be emitted.
virtual unsigned short _getEmissionCount (Real timeElapsed)=0
 Gets the number of particles which this emitter would like to emit based on the time elapsed.
virtual void _initParticle (Particle *pParticle)
 Initialises a particle based on the emitter's approach and parameters.
const StringgetType (void) const
 Returns the name of the type of emitter.
virtual void setEnabled (bool enabled)
 Sets whether or not the emitter is enabled.
virtual bool getEnabled (void) const
 Gets the flag indicating if this emitter is enabled or not.
virtual void setStartTime (Real startTime)
 Sets the 'start time' of this emitter.
virtual Real getStartTime (void) const
 Gets the start time of the emitter.
virtual void setDuration (Real duration)
 Sets the duration of the emitter.
virtual Real getDuration (void) const
 Gets the duration of the emitter from when it is created or re-enabled.
virtual void setDuration (Real min, Real max)
 Sets the range of random duration for this emitter.
virtual void setMinDuration (Real min)
 Sets the minimum duration of this emitter in seconds (see setDuration for more details).
virtual void setMaxDuration (Real max)
 Sets the maximum duration of this emitter in seconds (see setDuration for more details).
virtual Real getMinDuration (void) const
 Gets the minimum duration of this emitter in seconds (see setDuration for more details).
virtual Real getMaxDuration (void) const
 Gets the maximum duration of this emitter in seconds (see setDuration for more details).
virtual void setRepeatDelay (Real duration)
 Sets the time between repeats of the emitter.
virtual Real getRepeatDelay (void) const
 Gets the duration of the emitter from when it is created or re-enabled.
virtual void setRepeatDelay (Real min, Real max)
 Sets the range of random duration for this emitter.
virtual void setMinRepeatDelay (Real min)
 Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details).
virtual void setMaxRepeatDelay (Real max)
 Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details).
virtual Real getMinRepeatDelay (void) const
 Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details).
virtual Real getMaxRepeatDelay (void) const
 Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details).
const StringgetName (void) const
 Returns the name of the emitter.
virtual void setName (const String &newName)
 Sets the name of the emitter.
const StringgetEmittedEmitter (void) const
 Returns the name of the emitter to be emitted.
virtual void setEmittedEmitter (const String &emittedEmitter)
 Sets the name of the emitter to be emitted.
virtual bool isEmitted (void) const
 Return ´true´ if the emitter is emitted by another emitter.
virtual void setEmitted (bool emitted)
 Set the indication (true/false) to indicate that the emitter is emitted by another emitter.
ParamDictionarygetParamDictionary (void)
 Retrieves the parameter dictionary for this class.
const ParamDictionarygetParamDictionary (void) const
const ParameterListgetParameters (void) const
 Retrieves a list of parameters valid for this object.
virtual bool setParameter (const String &name, const String &value)
 Generic parameter setting method.
virtual void setParameterList (const NameValuePairList &paramList)
 Generic multiple parameter setting method.
virtual String getParameter (const String &name) const
 Generic parameter retrieval method.
virtual void copyParametersTo (StringInterface *dest) const
 Method for copying this object's parameters to another object.
void setDimensions (Real width, Real height)
 Sets the width and height for this particle.
bool hasOwnDimensions (void) const
 Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e.
Real getOwnWidth (void) const
 Retrieves the particle's personal width, if hasOwnDimensions is true.
Real getOwnHeight (void) const
 Retrieves the particle's personal width, if hasOwnDimensions is true.
void setRotation (const Radian &rad)
 Sets the current rotation.
const RadiangetRotation (void) const
void _notifyOwner (ParticleSystem *owner)
 Internal method for notifying the particle of it's owner.
void _notifyVisualData (ParticleVisualData *vis)
 Internal method for notifying the particle of it's optional visual data.
ParticleVisualDatagetVisualData (void) const
 Get the optional visual data associated with the class.
void resetDimensions (void)
 Utility method to reset this particle.
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
void * operator new (size_t sz)
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void * operator new[] (size_t sz)
void operator delete (void *ptr)
void operator delete (void *ptr, const char *, int, const char *)
void operator delete[] (void *ptr)
void operator delete[] (void *ptr, const char *, int, const char *)

Static Public Member Functions

static void cleanupDictionary ()
 Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g.

Public Attributes

bool mOwnDimensions
 Does this particle have it's own dimensions?
Real mWidth
 Personal width if mOwnDimensions == true.
Real mHeight
 Personal height if mOwnDimensions == true.
Radian rotation
 Current rotation value.
Vector3 position
 World position.
Vector3 direction
 Direction (and speed).
ColourValue colour
 Current colour.
Real timeToLive
 Time to live, number of seconds left of particles natural life.
Real totalTimeToLive
 Total Time to live, number of seconds of particles natural life.
Radian rotationSpeed
 Speed of rotation in radians/sec.
ParticleType particleType
 Determines the type of particle.

Protected Member Functions

virtual void genEmissionDirection (Vector3 &destVector)
 Internal utility method for generating particle exit direction.
virtual void genEmissionVelocity (Vector3 &destVector)
 Internal utility method to apply velocity to a particle direction.
virtual Real genEmissionTTL (void)
 Internal utility method for generating a time-to-live for a particle.
virtual void genEmissionColour (ColourValue &destColour)
 Internal utility method for generating a colour for a particle.
virtual unsigned short genConstantEmissionCount (Real timeElapsed)
 Internal utility method for generating an emission count based on a constant emission rate.
void addBaseParameters (void)
 Internal method for setting up the basic parameter definitions for a subclass.
void initDurationRepeat (void)
 Internal method for initialising the duration & repeat of an emitter.
bool createParamDictionary (const String &className)
 Internal method for creating a parameter dictionary for the class, if it does not already exist.

Protected Attributes

ParticleSystemmParent
 Parent particle system.
Vector3 mPosition
 Position relative to the center of the ParticleSystem.
Real mEmissionRate
 Rate in particles per second at which this emitter wishes to emit particles.
String mType
 Name of the type of emitter, MUST be initialised by subclasses.
Vector3 mDirection
 Base direction of the emitter, may not be used by some emitters.
Vector3 mUp
Radian mAngle
 Angle around direction which particles may be emitted, internally radians but angleunits for interface.
Real mMinSpeed
 Min speed of particles.
Real mMaxSpeed
 Max speed of particles.
Real mMinTTL
 Initial time-to-live of particles (min).
Real mMaxTTL
 Initial time-to-live of particles (max).
ColourValue mColourRangeStart
 Initial colour of particles (range start).
ColourValue mColourRangeEnd
 Initial colour of particles (range end).
bool mEnabled
 Whether this emitter is currently enabled (defaults to true).
Real mStartTime
 Start time (in seconds from start of first call to ParticleSystem to update).
Real mDurationMin
 Minimum length of time emitter will run for (0 = forever).
Real mDurationMax
 Maximum length of time the emitter will run for (0 = forever).
Real mDurationRemain
 Current duration remainder.
Real mRepeatDelayMin
 Time between each repeat.
Real mRepeatDelayMax
Real mRepeatDelayRemain
 Repeat delay left.
Real mRemainder
String mName
 The name of the emitter. The name is optional unless it is used as an emitter that is emitted itself.
String mEmittedEmitter
 The name of the emitter to be emitted (optional).
bool mEmitted
String mParamDictName
 Class name for this instance to be used as a lookup (must be initialised by subclasses).
ParticleSystemmParentSystem
 Parent ParticleSystem.
ParticleVisualDatamVisual
 Additional visual data you might want to associate with the Particle.

Static Protected Attributes

static
EmitterCommands::CmdAngle 
msAngleCmd
static
EmitterCommands::CmdColour 
msColourCmd
static
EmitterCommands::CmdColourRangeStart 
msColourRangeStartCmd
static
EmitterCommands::CmdColourRangeEnd 
msColourRangeEndCmd
static
EmitterCommands::CmdDirection 
msDirectionCmd
static
EmitterCommands::CmdEmissionRate 
msEmissionRateCmd
static
EmitterCommands::CmdMaxTTL 
msMaxTTLCmd
static
EmitterCommands::CmdMaxVelocity 
msMaxVelocityCmd
static
EmitterCommands::CmdMinTTL 
msMinTTLCmd
static
EmitterCommands::CmdMinVelocity 
msMinVelocityCmd
static
EmitterCommands::CmdPosition 
msPositionCmd
static
EmitterCommands::CmdTTL 
msTTLCmd
static
EmitterCommands::CmdVelocity 
msVelocityCmd
static
EmitterCommands::CmdDuration 
msDurationCmd
static
EmitterCommands::CmdMinDuration 
msMinDurationCmd
static
EmitterCommands::CmdMaxDuration 
msMaxDurationCmd
static
EmitterCommands::CmdRepeatDelay 
msRepeatDelayCmd
static
EmitterCommands::CmdMinRepeatDelay 
msMinRepeatDelayCmd
static
EmitterCommands::CmdMaxRepeatDelay 
msMaxRepeatDelayCmd
static
EmitterCommands::CmdName 
msNameCmd
static
EmitterCommands::CmdEmittedEmitter 
msEmittedEmitterCmd
static ParamDictionaryMap msDictionary
 Dictionary of parameters.


Detailed Description

Abstract class defining the interface to be implemented by particle emitters.

Remarks:
Particle emitters are the sources of particles in a particle system. This class defines the ParticleEmitter interface, and provides a basic implementation for tasks which most emitters will do (these are of course overridable). Particle emitters can be grouped into types, e.g. 'point' emitters, 'box' emitters etc; each type will create particles with a different starting point, direction and velocity (although within the types you can configure the ranges of these parameters).
Because there are so many types of emitters you could use, OGRE chooses not to dictate the available types. It comes with some in-built, but allows plugins or applications to extend the emitter types available. This is done by subclassing ParticleEmitter to have the appropriate emission behaviour you want, and also creating a subclass of ParticleEmitterFactory which is responsible for creating instances of your new emitter type. You register this factory with the ParticleSystemManager using addEmitterFactory, and from then on emitters of this type can be created either from code or through text particle scripts by naming the type.
This same approach is used for ParticleAffectors (which modify existing particles per frame). This means that OGRE is particularly flexible when it comes to creating particle system effects, with literally infinite combinations of emitter and affector types, and paramters within those types.

Definition at line 66 of file OgreParticleEmitter.h.


Member Enumeration Documentation

enum Ogre::Particle::ParticleType [inherited]

Type of particle.

Enumerator:
Visual 
Emitter 

Definition at line 64 of file OgreParticle.h.


Constructor & Destructor Documentation

Ogre::ParticleEmitter::ParticleEmitter ( ParticleSystem psys  ) 

virtual Ogre::ParticleEmitter::~ParticleEmitter (  )  [virtual]

Virtual destructor essential.


Member Function Documentation

virtual void Ogre::ParticleEmitter::genEmissionDirection ( Vector3 destVector  )  [protected, virtual]

Internal utility method for generating particle exit direction.

Parameters:
destVector Reference to vector to complete with new direction (normalised)

virtual void Ogre::ParticleEmitter::genEmissionVelocity ( Vector3 destVector  )  [protected, virtual]

Internal utility method to apply velocity to a particle direction.

Parameters:
destVector The vector to scale by a randomly generated scale between min and max speed. Assumed normalised already, and likely already oriented in the right direction.

virtual Real Ogre::ParticleEmitter::genEmissionTTL ( void   )  [protected, virtual]

Internal utility method for generating a time-to-live for a particle.

virtual void Ogre::ParticleEmitter::genEmissionColour ( ColourValue destColour  )  [protected, virtual]

Internal utility method for generating a colour for a particle.

virtual unsigned short Ogre::ParticleEmitter::genConstantEmissionCount ( Real  timeElapsed  )  [protected, virtual]

Internal utility method for generating an emission count based on a constant emission rate.

void Ogre::ParticleEmitter::addBaseParameters ( void   )  [protected]

Internal method for setting up the basic parameter definitions for a subclass.

Remarks:
Because StringInterface holds a dictionary of parameters per class, subclasses need to call this to ask the base class to add it's parameters to their dictionary as well. Can't do this in the constructor because that runs in a non-virtual context.
The subclass must have called it's own createParamDictionary before calling this method.

void Ogre::ParticleEmitter::initDurationRepeat ( void   )  [protected]

Internal method for initialising the duration & repeat of an emitter.

virtual void Ogre::ParticleEmitter::setPosition ( const Vector3 pos  )  [virtual]

Sets the position of this emitter relative to the particle system center.

virtual const Vector3& Ogre::ParticleEmitter::getPosition ( void   )  const [virtual]

Returns the position of this emitter relative to the center of the particle system.

virtual void Ogre::ParticleEmitter::setDirection ( const Vector3 direction  )  [virtual]

Sets the direction of the emitter.

Remarks:
Most emitters will have a base direction in which they emit particles (those which emit in all directions will ignore this parameter). They may not emit exactly along this vector for every particle, many will introduce a random scatter around this vector using the angle property.
Parameters:
direction The base direction for particles emitted.

virtual const Vector3& Ogre::ParticleEmitter::getDirection ( void   )  const [virtual]

Returns the base direction of the emitter.

virtual void Ogre::ParticleEmitter::setAngle ( const Radian angle  )  [virtual]

Sets the maximum angle away from the emitter direction which particle will be emitted.

Remarks:
Whilst the direction property defines the general direction of emission for particles, this property defines how far the emission angle can deviate away from this base direction. This allows you to create a scatter effect - if set to 0, all particles will be emitted exactly along the emitters direction vector, whereas if you set it to 180 degrees or more, particles will be emitted in a sphere, i.e. in all directions.
Parameters:
degrees Maximum angle which initial particle direction can deviate from the emitter base direction vector.

virtual const Radian& Ogre::ParticleEmitter::getAngle ( void   )  const [virtual]

Returns the maximum angle which the initial particle direction can deviate from the emitters base direction.

virtual void Ogre::ParticleEmitter::setParticleVelocity ( Real  speed  )  [virtual]

Sets the initial velocity of particles emitted.

Remarks:
This method sets a constant speed for emitted particles. See the alternate version of this method which takes 2 parameters if you want a variable speed.
Parameters:
speed The initial speed in world units per second which every particle emitted starts with.

virtual void Ogre::ParticleEmitter::setParticleVelocity ( Real  min,
Real  max 
) [virtual]

Sets the initial velocity range of particles emitted.

Remarks:
This method sets the range of starting speeds for emitted particles. See the alternate version of this method which takes 1 parameter if you want a constant speed. This emitter will randomly choose a speed between the minimum and maximum for each particle.
Parameters:
max The maximum speed in world units per second for the initial particle speed on emission.
min The minimum speed in world units per second for the initial particle speed on emission.

virtual void Ogre::ParticleEmitter::setMinParticleVelocity ( Real  min  )  [virtual]

Returns the minimum particle velocity.

virtual void Ogre::ParticleEmitter::setMaxParticleVelocity ( Real  max  )  [virtual]

Returns the maximum particle velocity.

virtual Real Ogre::ParticleEmitter::getParticleVelocity ( void   )  const [virtual]

Returns the initial velocity of particles emitted.

virtual Real Ogre::ParticleEmitter::getMinParticleVelocity ( void   )  const [virtual]

Returns the minimum particle velocity.

virtual Real Ogre::ParticleEmitter::getMaxParticleVelocity ( void   )  const [virtual]

Returns the maximum particle velocity.

virtual void Ogre::ParticleEmitter::setEmissionRate ( Real  particlesPerSecond  )  [virtual]

Sets the emission rate for this emitter.

Remarks:
This method tells the emitter how many particles per second should be emitted. The emitter subclass does not have to emit these in a continuous burst - this is a relative parameter and the emitter may choose to emit all of the second's worth of particles every half-second for example. This is controlled by the emitter's getEmissionCount method.
Also, if the ParticleSystem's particle quota is exceeded, not all the particles requested may be actually emitted.
Parameters:
particlesPerSecond The number of particles to be emitted every second.

virtual Real Ogre::ParticleEmitter::getEmissionRate ( void   )  const [virtual]

Returns the emission rate set for this emitter.

virtual void Ogre::ParticleEmitter::setTimeToLive ( Real  ttl  )  [virtual]

Sets the lifetime of all particles emitted.

Remarks:
The emitter initialises particles with a time-to-live (TTL), the number of seconds a particle will exist before being destroyed. This method sets a constant TTL for all particles emitted. Note that affectors are able to modify the TTL of particles later.
Also see the alternate version of this method which takes a min and max TTL in order to have the TTL vary per particle.
Parameters:
ttl The number of seconds each particle will live for.

virtual void Ogre::ParticleEmitter::setTimeToLive ( Real  minTtl,
Real  maxTtl 
) [virtual]

Sets the range of lifetime for particles emitted.

Remarks:
The emitter initialises particles with a time-to-live (TTL), the number of seconds a particle will exist before being destroyed. This method sets a range for the TTL for all particles emitted; the ttl may be randomised between these 2 extremes or will vary some other way depending on the emitter. Note that affectors are able to modify the TTL of particles later.
Also see the alternate version of this method which takes a single TTL in order to set a constant TTL for all particles.
Parameters:
minTtl The minimum number of seconds each particle will live for.
maxTtl The maximum number of seconds each particle will live for.

virtual void Ogre::ParticleEmitter::setMinTimeToLive ( Real  min  )  [virtual]

Sets the minimum time each particle will live for.

virtual void Ogre::ParticleEmitter::setMaxTimeToLive ( Real  max  )  [virtual]

Sets the maximum time each particle will live for.

virtual Real Ogre::ParticleEmitter::getTimeToLive ( void   )  const [virtual]

Gets the time each particle will live for.

virtual Real Ogre::ParticleEmitter::getMinTimeToLive ( void   )  const [virtual]

Gets the minimum time each particle will live for.

virtual Real Ogre::ParticleEmitter::getMaxTimeToLive ( void   )  const [virtual]

Gets the maximum time each particle will live for.

virtual void Ogre::ParticleEmitter::setColour ( const ColourValue colour  )  [virtual]

Sets the initial colour of particles emitted.

Remarks:
Particles have an initial colour on emission which the emitter sets. This method sets this colour. See the alternate version of this method which takes 2 colours in order to establish a range of colours to be assigned to particles.
Parameters:
colour The colour which all particles will be given on emission.

virtual void Ogre::ParticleEmitter::setColour ( const ColourValue colourStart,
const ColourValue colourEnd 
) [virtual]

Sets the range of colours for emitted particles.

Remarks:
Particles have an initial colour on emission which the emitter sets. This method sets the range of this colour. See the alternate version of this method which takes a single colour in order to set a constant colour for all particles. Emitters may choose to randomly assign a colour in this range, or may use some other method to vary the colour.
Parameters:
colourStart The start of the colour range
colourEnd The end of the colour range

virtual void Ogre::ParticleEmitter::setColourRangeStart ( const ColourValue colour  )  [virtual]

Sets the minimum colour of particles to be emitted.

virtual void Ogre::ParticleEmitter::setColourRangeEnd ( const ColourValue colour  )  [virtual]

Sets the maximum colour of particles to be emitted.

virtual const ColourValue& Ogre::ParticleEmitter::getColour ( void   )  const [virtual]

Gets the colour of particles to be emitted.

virtual const ColourValue& Ogre::ParticleEmitter::getColourRangeStart ( void   )  const [virtual]

Gets the minimum colour of particles to be emitted.

virtual const ColourValue& Ogre::ParticleEmitter::getColourRangeEnd ( void   )  const [virtual]

Gets the maximum colour of particles to be emitted.

virtual unsigned short Ogre::ParticleEmitter::_getEmissionCount ( Real  timeElapsed  )  [pure virtual]

Gets the number of particles which this emitter would like to emit based on the time elapsed.

Remarks:
For efficiency the emitter does not actually create new Particle instances (these are reused by the ParticleSystem as existing particles 'die'). The implementation for this method must return the number of particles the emitter would like to emit given the number of seconds which have elapsed (passed in as a parameter).
Based on the return value from this method, the ParticleSystem class will call _initParticle once for each particle it chooses to allow to be emitted by this emitter. The emitter should not track these _initParticle calls, it should assume all emissions requested were made (even if they could not be because of particle quotas).

virtual void Ogre::ParticleEmitter::_initParticle ( Particle pParticle  )  [virtual]

Initialises a particle based on the emitter's approach and parameters.

Remarks:
See the _getEmissionCount method for details of why there is a separation between 'requested' emissions and actual initialised particles.
Parameters:
pParticle Pointer to a particle which must be initialised based on how this emitter starts particles. This is passed as a pointer rather than being created by the emitter so the ParticleSystem can reuse Particle instances, and can also set defaults itself.

Definition at line 371 of file OgreParticleEmitter.h.

References Ogre::Particle::resetDimensions().

const String& Ogre::ParticleEmitter::getType ( void   )  const

Returns the name of the type of emitter.

Remarks:
This property is useful for determining the type of emitter procedurally so another can be created.

Definition at line 382 of file OgreParticleEmitter.h.

virtual void Ogre::ParticleEmitter::setEnabled ( bool  enabled  )  [virtual]

Sets whether or not the emitter is enabled.

Remarks:
You can turn an emitter off completely by setting this parameter to false.

virtual bool Ogre::ParticleEmitter::getEnabled ( void   )  const [virtual]

Gets the flag indicating if this emitter is enabled or not.

virtual void Ogre::ParticleEmitter::setStartTime ( Real  startTime  )  [virtual]

Sets the 'start time' of this emitter.

Remarks:
By default an emitter starts straight away as soon as a ParticleSystem is first created, or also just after it is re-enabled. This parameter allows you to set a time delay so that the emitter does not 'kick in' until later.
Parameters:
startTime The time in seconds from the creation or enabling of the emitter.

virtual Real Ogre::ParticleEmitter::getStartTime ( void   )  const [virtual]

Gets the start time of the emitter.

virtual void Ogre::ParticleEmitter::setDuration ( Real  duration  )  [virtual]

Sets the duration of the emitter.

Remarks:
By default emitters run indefinitely (unless you manually disable them). By setting this parameter, you can make an emitter turn off on it's own after a set number of seconds. It will then remain disabled until either setEnabled(true) is called, or if the 'repeatAfter' parameter has been set it will also repeat after a number of seconds.
Also see the alternative version of this method which allows you to set a min and max duration for a random variable duration.
Parameters:
duration The duration in seconds.

virtual Real Ogre::ParticleEmitter::getDuration ( void   )  const [virtual]