#include <OgreParticleEmitter.h>
Inheritance diagram for Ogre::ParticleEmitter:
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 Vector3 & | getPosition (void) const |
Returns the position of this emitter relative to thte center of the particle system. | |
virtual void | setDirection (const Vector3 &direction) |
Sets the direction of the emitter. | |
virtual const Vector3 & | getDirection (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 Radian & | getAngle (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 String & | getType (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 String & | getName (void) const |
Returns the name of the emitter. | |
virtual void | setName (const String &newName) |
Sets the name of the emitter. | |
const String & | getEmittedEmitter (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. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
const ParameterList & | getParameters (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 ¶mList) |
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 Radian & | getRotation (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. | |
ParticleVisualData * | getVisualData (void) const |
Get the optional visual data associated with the class. | |
void | resetDimensions (void) |
Utility method to reset this particle. | |
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 | |
ParticleSystem * | mParent |
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). | |
ParticleSystem * | mParentSystem |
Parent ParticleSystem. | |
ParticleVisualData * | mVisual |
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. |
Definition at line 66 of file OgreParticleEmitter.h.
|
Type of particle.
Definition at line 64 of file OgreParticle.h. |
|
|
|
Virtual destructor essential.
|
|
Gets the number of particles which this emitter would like to emit based on the time elapsed.
|
|
Initialises a particle based on the emitter's approach and parameters.
Definition at line 376 of file OgreParticleEmitter.h. |
|
Internal method for notifying the particle of it's owner.
|
|
Internal method for notifying the particle of it's optional visual data.
Definition at line 136 of file OgreParticle.h. |
|
Internal method for setting up the basic parameter definitions for a subclass.
|
|
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. MaterialManager) initializes. |
|
Method for copying this object's parameters to another object.
Definition at line 300 of file OgreStringInterface.h. References Ogre::ParamDictionary::mParamDefs. |
|
Internal method for creating a parameter dictionary for the class, if it does not already exist.
Definition at line 176 of file OgreStringInterface.h. |
|
Internal utility method for generating an emission count based on a constant emission rate.
|
|
Internal utility method for generating a colour for a particle.
|
|
Internal utility method for generating particle exit direction.
|
|
Internal utility method for generating a time-to-live for a particle.
|
|
Internal utility method to apply velocity to a particle direction.
|
|
Returns the maximum angle which the initial particle direction can deviate from the emitters base direction.
|
|
Gets the colour of particles to be emitted.
|
|
Gets the maximum colour of particles to be emitted.
|
|
Gets the minimum colour of particles to be emitted.
|
|
Returns the base direction of the emitter.
|
|
Gets the duration of the emitter from when it is created or re-enabled.
|
|
Returns the emission rate set for this emitter.
|
|
Returns the name of the emitter to be emitted.
|
|
Gets the flag indicating if this emitter is enabled or not.
|
|
Gets the maximum duration of this emitter in seconds (see setDuration for more details).
|
|
Returns the maximum particle velocity.
|
|
Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details).
|
|
Gets the maximum time each particle will live for.
|
|
Gets the minimum duration of this emitter in seconds (see setDuration for more details).
|
|
Returns the minimum particle velocity.
|
|
Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details).
|
|
Gets the minimum time each particle will live for.
|
|
Returns the name of the emitter.
|
|
Retrieves the particle's personal width, if hasOwnDimensions is true.
Definition at line 123 of file OgreParticle.h. |
|
Retrieves the particle's personal width, if hasOwnDimensions is true.
Definition at line 120 of file OgreParticle.h. |
|
Definition at line 213 of file OgreStringInterface.h. |
|
Retrieves the parameter dictionary for this class.
Definition at line 200 of file OgreStringInterface.h. |
|
Generic parameter retrieval method.
Definition at line 269 of file OgreStringInterface.h. References Ogre::ParamCommand::doGet(), and Ogre::ParamDictionary::getParamCommand(). |
|
Retrieves a list of parameters valid for this object.
|
|
Returns the initial velocity of particles emitted.
|
|
Returns the position of this emitter relative to thte center of the particle system.
|
|
Gets the duration of the emitter from when it is created or re-enabled.
|
|
Definition at line 128 of file OgreParticle.h. |
|
Gets the start time of the emitter.
|
|
Gets the time each particle will live for.
|
|
Returns the name of the type of emitter.
Definition at line 387 of file OgreParticleEmitter.h. |
|
Get the optional visual data associated with the class.
Definition at line 139 of file OgreParticle.h. |
|
Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e. if the particle::setDimensions method has been called for this instance).
Definition at line 117 of file OgreParticle.h. |
|
Internal method for initialising the duration & repeat of an emitter.
|
|
Return ´true´ if the emitter is emitted by another emitter.
|
|
Utility method to reset this particle.
|
|
Sets the maximum angle away from the emitter direction which particle will be emitted.
|
|
Sets the range of colours for emitted particles.
|
|
Sets the initial colour of particles emitted.
|
|
Sets the maximum colour of particles to be emitted.
|
|
Sets the minimum colour of particles to be emitted.
|
|
Sets the width and height for this particle.
|
|
Sets the direction of the emitter.
|
|
Sets the range of random duration for this emitter.
|
|
Sets the duration of the emitter.
|
|
Sets the emission rate for this emitter.
|
|
Set the indication (true/false) to indicate that the emitter is emitted by another emitter.
|
|
Sets the name of the emitter to be emitted.
|
|
Sets whether or not the emitter is enabled.
|
|
Sets the maximum duration of this emitter in seconds (see setDuration for more details).
|
|
Returns the maximum particle velocity.
|
|
Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details).
|
|
Sets the maximum time each particle will live for.
|
|
Sets the minimum duration of this emitter in seconds (see setDuration for more details).
|
|
Returns the minimum particle velocity.
|
|
Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details).
|
|
Sets the minimum time each particle will live for.
|
|
Sets the name of the emitter.
|
|
Generic parameter setting method.
|
|
Generic multiple parameter setting method.
|
|
Sets the initial velocity range of particles emitted.
|
|
Sets the initial velocity of particles emitted.
|
|
Sets the position of this emitter relative to the particle system center.
|
|
Sets the range of random duration for this emitter.
|
|
Sets the time between repeats of the emitter.
|
|
Sets the current rotation.
|
|
Sets the 'start time' of this emitter.
|
|
Sets the range of lifetime for particles emitted.
|
|
Sets the lifetime of all particles emitted.
|
|
Current colour.
Definition at line 85 of file OgreParticle.h. |
|
Direction (and speed).
Definition at line 83 of file OgreParticle.h. |
|
Angle around direction which particles may be emitted, internally radians but angleunits for interface.
Definition at line 107 of file OgreParticleEmitter.h. |
|
Initial colour of particles (range end).
Definition at line 119 of file OgreParticleEmitter.h. |
|
Initial colour of particles (range start).
Definition at line 117 of file OgreParticleEmitter.h. |
|
Base direction of the emitter, may not be used by some emitters.
Definition at line 103 of file OgreParticleEmitter.h. |
|
Maximum length of time the emitter will run for (0 = forever).
Definition at line 129 of file OgreParticleEmitter.h. |
|
Minimum length of time emitter will run for (0 = forever).
Definition at line 127 of file OgreParticleEmitter.h. |
|
Current duration remainder.
Definition at line 131 of file OgreParticleEmitter.h. |
|
Rate in particles per second at which this emitter wishes to emit particles.
Definition at line 99 of file OgreParticleEmitter.h. |
|
Definition at line 150 of file OgreParticleEmitter.h. |
|
The name of the emitter to be emitted (optional).
Definition at line 146 of file OgreParticleEmitter.h. |
|
Whether this emitter is currently enabled (defaults to true).
Definition at line 122 of file OgreParticleEmitter.h. |
|
Personal height if mOwnDimensions == true.
Definition at line 75 of file OgreParticle.h. |
|
Max speed of particles.
Definition at line 111 of file OgreParticleEmitter.h. |
|
Initial time-to-live of particles (max).
Definition at line 115 of file OgreParticleEmitter.h. |
|
Min speed of particles.
Definition at line 109 of file OgreParticleEmitter.h. |
|
Initial time-to-live of particles (min).
Definition at line 113 of file OgreParticleEmitter.h. |
|
The name of the emitter. The name is optional unless it is used as an emitter that is emitted itself.
Definition at line 143 of file OgreParticleEmitter.h. |
|
Does this particle have it's own dimensions?
Definition at line 71 of file OgreParticle.h. |
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
Definition at line 164 of file OgreStringInterface.h. |
|
Parent particle system.
Definition at line 95 of file OgreParticleEmitter.h. |
|
Parent ParticleSystem.
Definition at line 59 of file OgreParticle.h. |
|
Position relative to the center of the ParticleSystem.
Definition at line 97 of file OgreParticleEmitter.h. |
|
Definition at line 140 of file OgreParticleEmitter.h. |
|
Definition at line 135 of file OgreParticleEmitter.h. |
|
Time between each repeat.
Definition at line 134 of file OgreParticleEmitter.h. |
|
Repeat delay left.
Definition at line 137 of file OgreParticleEmitter.h. |
|
Definition at line 71 of file OgreParticleEmitter.h. |
|
Definition at line 72 of file OgreParticleEmitter.h. |
|
Definition at line 74 of file OgreParticleEmitter.h. |
|
Definition at line 73 of file OgreParticleEmitter.h. |
|
Dictionary of parameters.
Definition at line 161 of file OgreStringInterface.h. |
|
Definition at line 75 of file OgreParticleEmitter.h. |
|
Definition at line 84 of file OgreParticleEmitter.h. |
|
Definition at line 76 of file OgreParticleEmitter.h. |
|
Definition at line 91 of file OgreParticleEmitter.h. |
|
Definition at line 86 of file OgreParticleEmitter.h. |
|
Definition at line 89 of file OgreParticleEmitter.h. |
|
Definition at line 77 of file OgreParticleEmitter.h. |
|
Definition at line 78 of file OgreParticleEmitter.h. |
|
Definition at line 85 of file OgreParticleEmitter.h. |
|
Definition at line 88 of file OgreParticleEmitter.h. |
|
Definition at line 79 of file OgreParticleEmitter.h. |
|
Definition at line 80 of file OgreParticleEmitter.h. |
|
Definition at line 90 of file OgreParticleEmitter.h. |
|
Definition at line 81 of file OgreParticleEmitter.h. |
|
Definition at line 87 of file OgreParticleEmitter.h. |
|
Start time (in seconds from start of first call to ParticleSystem to update).
Definition at line 125 of file OgreParticleEmitter.h. |
|
Definition at line 82 of file OgreParticleEmitter.h. |
|
Definition at line 83 of file OgreParticleEmitter.h. |
|
Name of the type of emitter, MUST be initialised by subclasses.
Definition at line 101 of file OgreParticleEmitter.h. |
|
Definition at line 105 of file OgreParticleEmitter.h. |
|
Additional visual data you might want to associate with the Particle.
Definition at line 61 of file OgreParticle.h. |
|
Personal width if mOwnDimensions == true.
Definition at line 73 of file OgreParticle.h. |
|
Determines the type of particle.
Definition at line 93 of file OgreParticle.h. |
|
World position.
Definition at line 81 of file OgreParticle.h. |
|
Current rotation value.
Definition at line 77 of file OgreParticle.h. |
|
Speed of rotation in radians/sec.
Definition at line 91 of file OgreParticle.h. |
|
Time to live, number of seconds left of particles natural life.
Definition at line 87 of file OgreParticle.h. |
|
Total Time to live, number of seconds of particles natural life.
Definition at line 89 of file OgreParticle.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Dec 27 15:20:42 2007