OGRE  13.6
Object-Oriented Graphics Rendering Engine
Ogre::ParticleEmitter Class Reference

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

#include <OgreParticleEmitter.h>

+ Inheritance diagram for Ogre::ParticleEmitter:

Public Member Functions

 ParticleEmitter (ParticleSystem *psys)
 
virtual ~ParticleEmitter ()
 Virtual destructor essential. More...
 
virtual unsigned short _getEmissionCount (Real timeElapsed)
 Gets the number of particles which this emitter would like to emit based on the time elapsed. More...
 
virtual void _initParticle (Particle *pParticle)
 Initialises a particle based on the emitter's approach and parameters. More...
 
virtual const RadiangetAngle (void) const
 Returns the maximum angle which the initial particle direction can deviate from the emitters base direction. More...
 
virtual const ColourValuegetColour (void) const
 Gets the colour of particles to be emitted. More...
 
virtual const ColourValuegetColourRangeEnd (void) const
 Gets the maximum colour of particles to be emitted. More...
 
virtual const ColourValuegetColourRangeStart (void) const
 Gets the minimum colour of particles to be emitted. More...
 
virtual const Vector3getDirection (void) const
 Returns the base direction of the emitter. More...
 
virtual const Vector3getDirPositionReference () 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 StringgetEmittedEmitter (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...
 
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 StringgetName (void) const
 Returns the name of the emitter. More...
 
virtual Real getParticleVelocity (void) const
 Returns the initial velocity of particles emitted. More...
 
virtual const Vector3getPosition (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...
 
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 StringgetType (void) const
 Returns the name of the type of emitter. More...
 
virtual const Vector3getUp (void) const
 Returns the up vector of the emitter. More...
 
virtual bool isEmitted (void) const
 Return true if the emitter is emitted by another emitter. 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...
 
virtual void setDirection (const Vector3 &direction)
 Sets the direction of the emitter. 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...
 
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...
 
virtual void setParticleVelocity (Real min, Real max)
 Sets the initial velocity range of particles emitted. More...
 
virtual void setParticleVelocity (Real speed)
 Sets the initial velocity 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...
 
virtual void setStartTime (Real startTime)
 Sets the 'start time' of this emitter. More...
 
virtual void setTimeToLive (Real minTtl, Real maxTtl)
 Sets the range of lifetime for particles emitted. More...
 
virtual void setTimeToLive (Real ttl)
 Sets the lifetime of all particles emitted. More...
 
virtual void setUp (const Vector3 &up)
 Sets the notional up vector of the emitter. More...
 
- Public Member Functions inherited from Ogre::StringInterface
 StringInterface ()
 
virtual ~StringInterface ()
 Virtual destructor, see Effective C++. More...
 
void copyParametersTo (StringInterface *dest) const
 Method for copying this object's parameters to another object. More...
 
ParamDictionarygetParamDictionary (void)
 Retrieves the parameter dictionary for this class. More...
 
const ParamDictionarygetParamDictionary (void) const
 
String getParameter (const String &name) const
 Generic parameter retrieval method. More...
 
const ParameterListgetParameters (void) const
 Retrieves a list of parameters valid for this object. More...
 
bool setParameter (const String &name, const String &value)
 Generic parameter setting method. More...
 
void setParameterList (const NameValuePairList &paramList)
 Generic multiple parameter setting method. More...
 
- Public Member Functions inherited from Ogre::Particle
 Particle ()
 
float getOwnHeight (void) const
 Retrieves the particle's personal width, if hasOwnDimensions is true. More...
 
float getOwnWidth (void) const
 Retrieves the particle's personal width, if hasOwnDimensions is true. More...
 
const RadiangetRotation (void) const
 
bool hasOwnDimensions (void) const
 
void setDimensions (float width, float height)
 Sets the width and height for this particle. More...
 
void setRotation (const Radian &rad)
 Sets the current rotation. More...
 

Additional Inherited Members

- Public Types inherited from Ogre::Particle
enum  ParticleType : uint8 { Visual , Emitter }
 Type of particle. More...
 
- Static Public Member Functions inherited from Ogre::StringInterface
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 inherited from Ogre::Particle
RGBA mColour
 Current colour. More...
 
Vector3 mDirection
 Direction (and speed) More...
 
float mHeight
 Particle height. More...
 
ParticleType mParticleType
 Determines the type of particle. More...
 
Vector3 mPosition
 World position. More...
 
uint8 mRandomTexcoordOffset
 
Radian mRotation
 Current rotation value. More...
 
Radian mRotationSpeed
 Speed of rotation in radians/sec. More...
 
uint8 mTexcoordIndex
 Index into the array of texture coordinates. More...
 
float mTimeToLive
 Time to live, number of seconds left of particles natural life. More...
 
float mTotalTimeToLive
 Total Time to live, number of seconds of particles natural life. More...
 
float mWidth
 Particle width. More...
 

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 parameters within those types.

Constructor & Destructor Documentation

◆ ParticleEmitter()

Ogre::ParticleEmitter::ParticleEmitter ( ParticleSystem psys)

◆ ~ParticleEmitter()

virtual Ogre::ParticleEmitter::~ParticleEmitter ( )
virtual

Virtual destructor essential.

Member Function Documentation

◆ setPosition()

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

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

◆ getPosition()

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

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

◆ setDirection()

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.
Note
This resets the up vector.
Parameters
directionThe base direction for particles emitted.

Reimplemented in Ogre::AreaEmitter.

◆ getDirection()

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

Returns the base direction of the emitter.

◆ setUp()

virtual void Ogre::ParticleEmitter::setUp ( const Vector3 up)
virtual

Sets the notional up vector of the emitter.

Remarks
Many emitters emit particles from within a region, and for some that region is not circularly symmetric about the emitter direction. The up vector allows such emitters to be orientated about the direction vector.
Parameters
upThe base direction for particles emitted. It must be perpendicular to the direction vector.

◆ getUp()

virtual const Vector3& Ogre::ParticleEmitter::getUp ( void  ) const
virtual

Returns the up vector of the emitter.

◆ setDirPositionReference()

virtual void Ogre::ParticleEmitter::setDirPositionReference ( const Vector3 position,
bool  enable 
)
virtual

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)

Note
Although once enabled mDirPositionRef will supersede mDirection; calling setDirection() may still be needed to setup a custom up vector.
Parameters
positionThe 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.
enableTrue to use mDirPositionRef, false to use the default behaviour with mDirection

◆ getDirPositionReference()

virtual const Vector3& Ogre::ParticleEmitter::getDirPositionReference ( ) const
virtual

Returns the position reference to generate direction of emitted particles.

◆ getDirPositionReferenceEnabled()

virtual bool Ogre::ParticleEmitter::getDirPositionReferenceEnabled ( ) const
virtual

Returns whether direction or position reference is used.

◆ setAngle()

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
angleMaximum angle which initial particle direction can deviate from the emitter base direction vector.

◆ getAngle()

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.

◆ setParticleVelocity() [1/2]

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
speedThe initial speed in world units per second which every particle emitted starts with.

◆ setParticleVelocity() [2/2]

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
maxThe maximum speed in world units per second for the initial particle speed on emission.
minThe minimum speed in world units per second for the initial particle speed on emission.

◆ setMinParticleVelocity()

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

Returns the minimum particle velocity.

◆ setMaxParticleVelocity()

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

Returns the maximum particle velocity.

◆ getParticleVelocity()

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

Returns the initial velocity of particles emitted.

◆ getMinParticleVelocity()

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

Returns the minimum particle velocity.

◆ getMaxParticleVelocity()

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

Returns the maximum particle velocity.

◆ setEmissionRate()

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
particlesPerSecondThe number of particles to be emitted every second.

◆ getEmissionRate()

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

Returns the emission rate set for this emitter.

◆ setTimeToLive() [1/2]

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
ttlThe number of seconds each particle will live for.

◆ setTimeToLive() [2/2]

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
minTtlThe minimum number of seconds each particle will live for. Must be non-negative!
maxTtlThe maximum number of seconds each particle will live for. Must be non-negative!

◆ setMinTimeToLive()

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

Sets the minimum time each particle will live for.

Must be non-negative!

◆ setMaxTimeToLive()

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

Sets the maximum time each particle will live for.

Must be non-negative!

◆ getTimeToLive()

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

Gets the time each particle will live for.

◆ getMinTimeToLive()

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

Gets the minimum time each particle will live for.

◆ getMaxTimeToLive()

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

Gets the maximum time each particle will live for.

◆ setColour() [1/2]

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
colourThe colour which all particles will be given on emission.

◆ setColour() [2/2]

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
colourStartThe start of the colour range
colourEndThe end of the colour range

◆ setColourRangeStart()

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

Sets the minimum colour of particles to be emitted.

◆ setColourRangeEnd()

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

Sets the maximum colour of particles to be emitted.

◆ getColour()

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

Gets the colour of particles to be emitted.

◆ getColourRangeStart()

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

Gets the minimum colour of particles to be emitted.

◆ getColourRangeEnd()

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

Gets the maximum colour of particles to be emitted.

◆ _getEmissionCount()

virtual unsigned short Ogre::ParticleEmitter::_getEmissionCount ( Real  timeElapsed)
inlinevirtual

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).

◆ _initParticle()

virtual void Ogre::ParticleEmitter::_initParticle ( Particle pParticle)
inlinevirtual

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
pParticlePointer 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::RingEmitter, Ogre::PointEmitter, Ogre::HollowEllipsoidEmitter, Ogre::EllipsoidEmitter, Ogre::CylinderEmitter, and Ogre::BoxEmitter.

References Ogre::ParticleSystem::getDefaultHeight(), Ogre::ParticleSystem::getDefaultWidth(), and Ogre::Particle::setDimensions().

◆ getType()

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

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.

◆ setEnabled()

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.

◆ getEnabled()

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

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

◆ setStartTime()

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
startTimeThe time in seconds from the creation or enabling of the emitter.

◆ getStartTime()

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

Gets the start time of the emitter.

◆ setDuration() [1/2]

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
durationThe duration in seconds.

◆ getDuration()

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

Gets the duration of the emitter from when it is created or re-enabled.

◆ setDuration() [2/2]

virtual void Ogre::ParticleEmitter::setDuration ( Real  min,
Real  max 
)
virtual

Sets the range of random duration for this 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 random 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 constant duration.
Parameters
minThe minimum duration in seconds.
maxThe minimum duration in seconds.

◆ setMinDuration()

virtual void Ogre::ParticleEmitter::setMinDuration ( Real  min)
virtual

Sets the minimum duration of this emitter in seconds (see setDuration for more details)

◆ setMaxDuration()

virtual void Ogre::ParticleEmitter::setMaxDuration ( Real  max)
virtual

Sets the maximum duration of this emitter in seconds (see setDuration for more details)

◆ getMinDuration()

virtual Real Ogre::ParticleEmitter::getMinDuration ( void  ) const
virtual

Gets the minimum duration of this emitter in seconds (see setDuration for more details)

◆ getMaxDuration()

virtual Real Ogre::ParticleEmitter::getMaxDuration ( void  ) const
virtual

Gets the maximum duration of this emitter in seconds (see setDuration for more details)

◆ setRepeatDelay() [1/2]

virtual void Ogre::ParticleEmitter::setRepeatDelay ( Real  duration)
virtual

Sets the time between repeats of the emitter.

Remarks
By default emitters run indefinitely (unless you manually disable them). However, if you manually disable the emitter (by calling setEnabled(false), or it's duration runs out, it will cease to emit
Also see the alternative version of this method which allows you to set a min and max duration for a random variable duration.
Parameters
durationThe duration in seconds.

◆ getRepeatDelay()

virtual Real Ogre::ParticleEmitter::getRepeatDelay ( void  ) const
virtual

Gets the duration of the emitter from when it is created or re-enabled.

◆ setRepeatDelay() [2/2]

virtual void Ogre::ParticleEmitter::setRepeatDelay ( Real  min,
Real  max 
)
virtual

Sets the range of random duration for this 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 random 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 constant duration.
Parameters
minThe minimum duration in seconds.
maxThe minimum duration in seconds.

◆ setMinRepeatDelay()

virtual void Ogre::ParticleEmitter::setMinRepeatDelay ( Real  min)
virtual

Sets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)

◆ setMaxRepeatDelay()

virtual void Ogre::ParticleEmitter::setMaxRepeatDelay ( Real  max)
virtual

Sets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)

◆ getMinRepeatDelay()

virtual Real Ogre::ParticleEmitter::getMinRepeatDelay ( void  ) const
virtual

Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details)

◆ getMaxRepeatDelay()

virtual Real Ogre::ParticleEmitter::getMaxRepeatDelay ( void  ) const
virtual

Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details)

◆ getName()

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

Returns the name of the emitter.

◆ setName()

virtual void Ogre::ParticleEmitter::setName ( const String newName)
virtual

Sets the name of the emitter.

◆ getEmittedEmitter()

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

Returns the name of the emitter to be emitted.

◆ setEmittedEmitter()

virtual void Ogre::ParticleEmitter::setEmittedEmitter ( const String emittedEmitter)
virtual

Sets the name of the emitter to be emitted.

◆ isEmitted()

virtual bool Ogre::ParticleEmitter::isEmitted ( void  ) const
virtual

Return true if the emitter is emitted by another emitter.

◆ setEmitted()

virtual void Ogre::ParticleEmitter::setEmitted ( bool  emitted)
virtual

Set the indication (true/false) to indicate that the emitter is emitted by another emitter.


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