OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
Particle emitter which emits particles randomly from points inside an area (box, sphere, ellipsoid whatever subclasses choose to be). More...
#include <OgreAreaEmitter.h>
Classes | |
class | CmdDepth |
Command object for area emitter size (see ParamCommand). More... | |
class | CmdHeight |
Command object for area emitter size (see ParamCommand). More... | |
class | CmdWidth |
Command object for area emitter size (see ParamCommand). More... | |
Public Types | |
enum | ParticleType { Visual, Emitter } |
Type of particle. More... | |
Public Member Functions | |
AreaEmitter (ParticleSystem *psys) | |
unsigned short | _getEmissionCount (Real timeElapsed) |
See ParticleEmitter. More... | |
virtual void | _initParticle (Particle *pParticle) |
Initialises a particle based on the emitter's approach and parameters. More... | |
void | _notifyOwner (ParticleSystem *owner) |
Internal method for notifying the particle of it's owner. More... | |
void | _notifyVisualData (ParticleVisualData *vis) |
Internal method for notifying the particle of it's optional visual data. More... | |
void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. More... | |
virtual const Radian & | getAngle (void) const |
Returns the maximum angle which the initial particle direction can deviate from the emitters base direction. More... | |
virtual const ColourValue & | getColour (void) const |
Gets the colour of particles to be emitted. More... | |
virtual const ColourValue & | getColourRangeEnd (void) const |
Gets the maximum colour of particles to be emitted. More... | |
virtual const ColourValue & | getColourRangeStart (void) const |
Gets the minimum colour of particles to be emitted. More... | |
Real | getDepth (void) const |
Gets the depth (local y size) of the emitter. More... | |
virtual const Vector3 & | getDirection (void) const |
Returns the base direction of the emitter. More... | |
virtual const Vector3 & | getDirPositionReference () const |
Returns the position reference to generate direction of emitted particles. More... | |
virtual bool | getDirPositionReferenceEnabled () const |
Returns whether direction or position reference is used. More... | |
virtual Real | getDuration (void) const |
Gets the duration of the emitter from when it is created or re-enabled. More... | |
virtual Real | getEmissionRate (void) const |
Returns the emission rate set for this emitter. More... | |
const String & | getEmittedEmitter (void) const |
Returns the name of the emitter to be emitted. More... | |
virtual bool | getEnabled (void) const |
Gets the flag indicating if this emitter is enabled or not. More... | |
Real | getHeight (void) const |
Gets the height (local y size) of the emitter. More... | |
virtual Real | getMaxDuration (void) const |
Gets the maximum duration of this emitter in seconds (see setDuration for more details) More... | |
virtual Real | getMaxParticleVelocity (void) const |
Returns the maximum particle velocity. More... | |
virtual Real | getMaxRepeatDelay (void) const |
Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details) More... | |
virtual Real | getMaxTimeToLive (void) const |
Gets the maximum time each particle will live for. More... | |
virtual Real | getMinDuration (void) const |
Gets the minimum duration of this emitter in seconds (see setDuration for more details) More... | |
virtual Real | getMinParticleVelocity (void) const |
Returns the minimum particle velocity. More... | |
virtual Real | getMinRepeatDelay (void) const |
Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details) More... | |
virtual Real | getMinTimeToLive (void) const |
Gets the minimum time each particle will live for. More... | |
const String & | getName (void) const |
Returns the name of the emitter. More... | |
Real | getOwnHeight (void) const |
Retrieves the particle's personal width, if hasOwnDimensions is true. More... | |
Real | getOwnWidth (void) const |
Retrieves the particle's personal width, if hasOwnDimensions is true. More... | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. More... | |
const ParamDictionary * | getParamDictionary (void) const |
String | getParameter (const String &name) const |
Generic parameter retrieval method. More... | |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. More... | |
virtual Real | getParticleVelocity (void) const |
Returns the initial velocity of particles emitted. More... | |
virtual const Vector3 & | getPosition (void) const |
Returns the position of this emitter relative to the center of the particle system. More... | |
virtual Real | getRepeatDelay (void) const |
Gets the duration of the emitter from when it is created or re-enabled. More... | |
const Radian & | getRotation (void) const |
virtual Real | getStartTime (void) const |
Gets the start time of the emitter. More... | |
virtual Real | getTimeToLive (void) const |
Gets the time each particle will live for. More... | |
const String & | getType (void) const |
Returns the name of the type of emitter. More... | |
virtual const Vector3 & | getUp (void) const |
Returns the up vector of the emitter. More... | |
ParticleVisualData * | getVisualData (void) const |
Get the optional visual data associated with the class. More... | |
Real | getWidth (void) const |
Gets the width (local x size) of the emitter. More... | |
bool | hasOwnDimensions (void) const |
Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e. More... | |
virtual bool | isEmitted (void) const |
Return true if the emitter is emitted by another emitter. More... | |
void | resetDimensions (void) |
Utility method to reset this particle. More... | |
virtual void | setAngle (const Radian &angle) |
Sets the maximum angle away from the emitter direction which particle will be emitted. More... | |
virtual void | setColour (const ColourValue &colour) |
Sets the initial colour of particles emitted. More... | |
virtual void | setColour (const ColourValue &colourStart, const ColourValue &colourEnd) |
Sets the range of colours for emitted particles. More... | |
virtual void | setColourRangeEnd (const ColourValue &colour) |
Sets the maximum colour of particles to be emitted. More... | |
virtual void | setColourRangeStart (const ColourValue &colour) |
Sets the minimum colour of particles to be emitted. More... | |
void | setDepth (Real Depth) |
Sets the depth (local y size) of the emitter. More... | |
void | setDimensions (Real width, Real height) |
Sets the width and height for this particle. More... | |
void | setDirection (const Vector3 &direction) |
Overloaded to update the trans. More... | |
virtual void | setDirPositionReference (const Vector3 &position, bool enable) |
Sets the direction of the emitter. More... | |
virtual void | setDuration (Real duration) |
Sets the duration of the emitter. More... | |
virtual void | setDuration (Real min, Real max) |
Sets the range of random duration for this emitter. More... | |
virtual void | setEmissionRate (Real particlesPerSecond) |
Sets the emission rate for this emitter. More... | |
virtual void | setEmitted (bool emitted) |
Set the indication (true/false) to indicate that the emitter is emitted by another emitter. More... | |
virtual void | setEmittedEmitter (const String &emittedEmitter) |
Sets the name of the emitter to be emitted. More... | |
virtual void | setEnabled (bool enabled) |
Sets whether or not the emitter is enabled. More... | |
void | setHeight (Real Height) |
Sets the height (local y size) of the emitter. More... | |
virtual void | setMaxDuration (Real max) |
Sets the maximum duration of this emitter in seconds (see setDuration for more details) More... | |
virtual void | setMaxParticleVelocity (Real max) |
Returns the maximum particle velocity. More... | |
virtual void | setMaxRepeatDelay (Real max) |
Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details) More... | |
virtual void | setMaxTimeToLive (Real max) |
Sets the maximum time each particle will live for. More... | |
virtual void | setMinDuration (Real min) |
Sets the minimum duration of this emitter in seconds (see setDuration for more details) More... | |
virtual void | setMinParticleVelocity (Real min) |
Returns the minimum particle velocity. More... | |
virtual void | setMinRepeatDelay (Real min) |
Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details) More... | |
virtual void | setMinTimeToLive (Real min) |
Sets the minimum time each particle will live for. More... | |
virtual void | setName (const String &newName) |
Sets the name of the emitter. More... | |
bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. More... | |
void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. More... | |
virtual void | setParticleVelocity (Real speed) |
Sets the initial velocity of particles emitted. More... | |
virtual void | setParticleVelocity (Real min, Real max) |
Sets the initial velocity range of particles emitted. More... | |
virtual void | setPosition (const Vector3 &pos) |
Sets the position of this emitter relative to the particle system center. More... | |
virtual void | setRepeatDelay (Real duration) |
Sets the time between repeats of the emitter. More... | |
virtual void | setRepeatDelay (Real min, Real max) |
Sets the range of random duration for this emitter. More... | |
void | setRotation (const Radian &rad) |
Sets the current rotation. More... | |
void | setSize (const Vector3 &size) |
Sets the size of the area from which particles are emitted. More... | |
void | setSize (Real x, Real y, Real z) |
Sets the size of the area from which particles are emitted. More... | |
virtual void | setStartTime (Real startTime) |
Sets the 'start time' of this emitter. More... | |
virtual void | setTimeToLive (Real ttl) |
Sets the lifetime of all particles emitted. More... | |
virtual void | setTimeToLive (Real minTtl, Real maxTtl) |
Sets the range of lifetime for particles emitted. More... | |
virtual void | setUp (const Vector3 &up) |
Sets the notional up vector of the emitter. More... | |
void | setWidth (Real width) |
Sets the width (local x size) of the emitter. More... | |
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. More... | |
Public Attributes | |
ColourValue | mColour |
Current colour. More... | |
Real | mHeight |
Personal height if mOwnDimensions == true. More... | |
bool | mOwnDimensions |
Does this particle have it's own dimensions? More... | |
ParticleType | mParticleType |
Determines the type of particle. More... | |
Radian | mRotation |
Current rotation value. More... | |
Radian | mRotationSpeed |
Speed of rotation in radians/sec. More... | |
Real | mTimeToLive |
Time to live, number of seconds left of particles natural life. More... | |
Real | mTotalTimeToLive |
Total Time to live, number of seconds of particles natural life. More... | |
Real | mWidth |
Personal width if mOwnDimensions == true. More... | |
Particle emitter which emits particles randomly from points inside an area (box, sphere, ellipsoid whatever subclasses choose to be).
|
inherited |
|
inline |
|
virtual |
See ParticleEmitter.
Implements Ogre::ParticleEmitter.
|
virtual |
void Ogre::AreaEmitter::setSize | ( | const Vector3 & | size | ) |
Sets the size of the area from which particles are emitted.
size | Vector describing the size of the area. The area extends around the center point by half the x, y and z components of this vector. The box is aligned such that it's local Z axis points along it's direction (see setDirection) |
Sets the size of the area from which particles are emitted.
x,y,z | Individual axis lengths describing the size of the area. The area extends around the center point by half the x, y and z components of this vector. The box is aligned such that it's local Z axis points along it's direction (see setDirection) |
void Ogre::AreaEmitter::setWidth | ( | Real | width | ) |
Sets the width (local x size) of the emitter.
Real Ogre::AreaEmitter::getWidth | ( | void | ) | const |
Gets the width (local x size) of the emitter.
void Ogre::AreaEmitter::setHeight | ( | Real | Height | ) |
Sets the height (local y size) of the emitter.
Real Ogre::AreaEmitter::getHeight | ( | void | ) | const |
Gets the height (local y size) of the emitter.
void Ogre::AreaEmitter::setDepth | ( | Real | Depth | ) |
Sets the depth (local y size) of the emitter.
Real Ogre::AreaEmitter::getDepth | ( | void | ) | const |
Gets the depth (local y size) of the emitter.
|
virtualinherited |
Sets the position of this emitter relative to the particle system center.
|
virtualinherited |
Returns the position of this emitter relative to the center of the particle system.
|
virtualinherited |
Returns the base direction of the emitter.
|
virtualinherited |
Sets the notional up vector of the emitter.
up | The base direction for particles emitted. It must be perpendicular to the direction vector. |
|
virtualinherited |
Returns the up vector of the emitter.
|
virtualinherited |
Sets the direction of the emitter.
Some particle effects need to emit particles in many random directions, but still following some rules; like not having them collide against each other. Very useful for explosions and implosions (when velocity is negative)
position | The reference position in which the direction of the particles will be calculated from, also taking into account the particle's position at the time of emission. |
enable | True to use mDirPositionRef, false to use the default behaviour with mDirection |
|
virtualinherited |
Returns the position reference to generate direction of emitted particles.
|
virtualinherited |
Returns whether direction or position reference is used.
|
virtualinherited |
Sets the maximum angle away from the emitter direction which particle will be emitted.
angle | Maximum angle which initial particle direction can deviate from the emitter base direction vector. |
|
virtualinherited |
Returns the maximum angle which the initial particle direction can deviate from the emitters base direction.
|
virtualinherited |
Sets the initial velocity of particles emitted.
speed | The initial speed in world units per second which every particle emitted starts with. |
Sets the initial velocity range of particles emitted.
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. |
|
virtualinherited |
Returns the minimum particle velocity.
|
virtualinherited |
Returns the maximum particle velocity.
|
virtualinherited |
Returns the initial velocity of particles emitted.
|
virtualinherited |
Returns the minimum particle velocity.
|
virtualinherited |
Returns the maximum particle velocity.
|
virtualinherited |
Sets the emission rate for this emitter.
particlesPerSecond | The number of particles to be emitted every second. |
|
virtualinherited |
Returns the emission rate set for this emitter.
|
virtualinherited |
Sets the lifetime of all particles emitted.
ttl | The number of seconds each particle will live for. |
Sets the range of lifetime for particles emitted.
minTtl | The minimum number of seconds each particle will live for. Must be non-negative! |
maxTtl | The maximum number of seconds each particle will live for. Must be non-negative! |
|
virtualinherited |
Sets the minimum time each particle will live for.
Must be non-negative!
|
virtualinherited |
Sets the maximum time each particle will live for.
Must be non-negative!
|
virtualinherited |
Gets the time each particle will live for.
|
virtualinherited |
Gets the minimum time each particle will live for.
|
virtualinherited |
Gets the maximum time each particle will live for.
|
virtualinherited |
Sets the initial colour of particles emitted.
colour | The colour which all particles will be given on emission. |
|
virtualinherited |
Sets the range of colours for emitted particles.
colourStart | The start of the colour range |
colourEnd | The end of the colour range |
|
virtualinherited |
Sets the minimum colour of particles to be emitted.
|
virtualinherited |
Sets the maximum colour of particles to be emitted.
|
virtualinherited |
Gets the colour of particles to be emitted.
|
virtualinherited |
Gets the minimum colour of particles to be emitted.
|
virtualinherited |
Gets the maximum colour of particles to be emitted.
|
inlinevirtualinherited |
Initialises a particle based on the emitter's approach and 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. |
Reimplemented in Ogre::HollowEllipsoidEmitter, Ogre::RingEmitter, Ogre::CylinderEmitter, Ogre::EllipsoidEmitter, Ogre::BoxEmitter, and Ogre::PointEmitter.
References Ogre::Particle::resetDimensions().
|
inlineinherited |
Returns the name of the type of emitter.
|
virtualinherited |
Sets whether or not the emitter is enabled.
|
virtualinherited |
Gets the flag indicating if this emitter is enabled or not.
|
virtualinherited |
Sets the 'start time' of this emitter.
startTime | The time in seconds from the creation or enabling of the emitter. |
|
virtualinherited |
Gets the start time of the emitter.
|
virtualinherited |
Sets the duration of the emitter.
duration | The duration in seconds. |
Sets the range of random duration for this emitter.
min | The minimum duration in seconds. |
max | The minimum duration in seconds. |
|
virtualinherited |
Gets the duration of the emitter from when it is created or re-enabled.
|
virtualinherited |
Sets the minimum duration of this emitter in seconds (see setDuration for more details)
|
virtualinherited |
Sets the maximum duration of this emitter in seconds (see setDuration for more details)
|
virtualinherited |
Gets the minimum duration of this emitter in seconds (see setDuration for more details)
|
virtualinherited |
Gets the maximum duration of this emitter in seconds (see setDuration for more details)
|
virtualinherited |
Sets the time between repeats of the emitter.
duration | The duration in seconds. |
Sets the range of random duration for this emitter.
min | The minimum duration in seconds. |
max | The minimum duration in seconds. |
|
virtualinherited |
Gets the duration of the emitter from when it is created or re-enabled.
|
virtualinherited |
Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)
|
virtualinherited |
Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)
|
virtualinherited |
Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)
|
virtualinherited |
Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)
|
inherited |
Returns the name of the emitter.
|
virtualinherited |
Sets the name of the emitter.
|
inherited |
Returns the name of the emitter to be emitted.
|
virtualinherited |
Sets the name of the emitter to be emitted.
|
virtualinherited |
Return true if the emitter is emitted by another emitter.
|
virtualinherited |
Set the indication (true/false) to indicate that the emitter is emitted by another emitter.
|
inlineinherited |
Retrieves the parameter dictionary for this class.
|
inlineinherited |
|
inherited |
Retrieves a list of parameters valid for this object.
Generic parameter setting method.
name | The name of the parameter to set |
value | String value. Must be in the right format for the type specified in the parameter definition. See the StringConverter class for more information. |
Referenced by Ogre::StringInterface::copyParametersTo().
|
inherited |
Generic multiple parameter setting method.
paramList | Name/value pair list |
Generic parameter retrieval method.
name | The name of the parameter to get |
References Ogre::ParamCommand::doGet().
|
inlineinherited |
Method for copying this object's parameters to another object.
dest | Pointer to object to have it's parameters set the same as this object. |
References Ogre::StringInterface::setParameter().
|
staticinherited |
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.
Sets the width and height for this particle.
|
inlineinherited |
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).
|
inlineinherited |
Retrieves the particle's personal width, if hasOwnDimensions is true.
|
inlineinherited |
Retrieves the particle's personal width, if hasOwnDimensions is true.
|
inherited |
Sets the current rotation.
|
inlineinherited |
|
inherited |
Internal method for notifying the particle of it's owner.
|
inlineinherited |
Internal method for notifying the particle of it's optional visual data.
|
inlineinherited |
Get the optional visual data associated with the class.
|
inherited |
Utility method to reset this particle.
Referenced by Ogre::ParticleEmitter::_initParticle().
|
inherited |
Does this particle have it's own dimensions?
|
inherited |
Personal width if mOwnDimensions == true.
|
inherited |
Personal height if mOwnDimensions == true.
|
inherited |
Current rotation value.
|
inherited |
Current colour.
|
inherited |
Time to live, number of seconds left of particles natural life.
|
inherited |
Total Time to live, number of seconds of particles natural life.
|
inherited |
Speed of rotation in radians/sec.
|
inherited |
Determines the type of particle.