OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::AreaEmitter Class Reference

Particle emitter which emits particles randomly from points inside an area (box, sphere, ellipsoid whatever subclasses choose to be). More...

#include <OgreAreaEmitter.h>

+ Inheritance diagram for Ogre::AreaEmitter:

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...
 
virtual void copyParametersTo (StringInterface *dest) const
 Method for copying this object's parameters to another object. More...
 
virtual const RadiangetAngle () const
 Returns the maximum angle which the initial particle direction can deviate from the emitters base direction. More...
 
virtual const ColourValuegetColour () const
 Gets the colour of particles to be emitted. More...
 
virtual const ColourValuegetColourRangeEnd () const
 Gets the maximum colour of particles to be emitted. More...
 
virtual const ColourValuegetColourRangeStart () const
 Gets the minimum colour of particles to be emitted. More...
 
Real getDepth () const
 Gets the depth (local y size) of the emitter. More...
 
virtual const Vector3getDirection () 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 () const
 Gets the duration of the emitter from when it is created or re-enabled. More...
 
virtual Real getEmissionRate () const
 Returns the emission rate set for this emitter. More...
 
const StringgetEmittedEmitter () const
 Returns the name of the emitter to be emitted. More...
 
virtual bool getEnabled () const
 Gets the flag indicating if this emitter is enabled or not. More...
 
Real getHeight () const
 Gets the height (local y size) of the emitter. More...
 
virtual Real getMaxDuration () const
 Gets the maximum duration of this emitter in seconds (see setDuration for more details) More...
 
virtual Real getMaxParticleVelocity () const
 Returns the maximum particle velocity. More...
 
virtual Real getMaxRepeatDelay () const
 Gets the maximum duration of this emitter in seconds (see setRepeatDelay for more details) More...
 
virtual Real getMaxTimeToLive () const
 Gets the maximum time each particle will live for. More...
 
virtual Real getMinDuration () const
 Gets the minimum duration of this emitter in seconds (see setDuration for more details) More...
 
virtual Real getMinParticleVelocity () const
 Returns the minimum particle velocity. More...
 
virtual Real getMinRepeatDelay () const
 Gets the minimum duration of this emitter in seconds (see setRepeatDelay for more details) More...
 
virtual Real getMinTimeToLive () const
 Gets the minimum time each particle will live for. More...
 
const StringgetName () const
 Returns the name of the emitter. More...
 
Real getOwnHeight () const
 Retrieves the particle's personal width, if hasOwnDimensions is true. More...
 
Real getOwnWidth () const
 Retrieves the particle's personal width, if hasOwnDimensions is true. More...
 
ParamDictionarygetParamDictionary ()
 Retrieves the parameter dictionary for this class. More...
 
const ParamDictionarygetParamDictionary () const
 
virtual String getParameter (const String &name) const
 Generic parameter retrieval method. More...
 
const ParameterListgetParameters () const
 Retrieves a list of parameters valid for this object. More...
 
virtual Real getParticleVelocity () const
 Returns the initial velocity of particles emitted. More...
 
virtual const Vector3getPosition () const
 Returns the position of this emitter relative to the center of the particle system. More...
 
virtual Real getRepeatDelay () const
 Gets the duration of the emitter from when it is created or re-enabled. More...
 
const RadiangetRotation () const
 
virtual Real getStartTime () const
 Gets the start time of the emitter. More...
 
virtual Real getTimeToLive () const
 Gets the time each particle will live for. More...
 
const StringgetType () const
 Returns the name of the type of emitter. More...
 
virtual const Vector3getUp () const
 Returns the up vector of the emitter. More...
 
ParticleVisualDatagetVisualData () const
 Get the optional visual data associated with the class. More...
 
Real getWidth () const
 Gets the width (local x size) of the emitter. More...
 
bool hasOwnDimensions () const
 Returns true if this particle deviates from the ParticleSystem's default dimensions (i.e. More...
 
virtual bool isEmitted () const
 Return true if the emitter is emitted by another emitter. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void resetDimensions ()
 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...
 
virtual bool setParameter (const String &name, const String &value)
 Generic parameter setting method. More...
 
virtual void setParameterList (const NameValuePairList &paramList)
 Generic multiple parameter setting method. 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...
 
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 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...
 
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...
 

Detailed Description

Particle emitter which emits particles randomly from points inside an area (box, sphere, ellipsoid whatever subclasses choose to be).

Remarks
This is an empty superclass and needs to be subclassed. Basic particle emitter emits particles from/in an (unspecified) area. The initial direction of these particles can either be a single direction (i.e. a line), a random scattering inside a cone, or a random scattering in all directions, depending the 'angle' parameter, which is the angle across which to scatter the particles either side of the base direction of the emitter.

Member Enumeration Documentation

◆ ParticleType

Type of particle.

Enumerator
Visual 
Emitter 

Constructor & Destructor Documentation

◆ AreaEmitter()

Ogre::AreaEmitter::AreaEmitter ( ParticleSystem psys)
inline

Member Function Documentation

◆ _getEmissionCount()

unsigned short Ogre::AreaEmitter::_getEmissionCount ( Real  timeElapsed)
virtual

◆ _initParticle()

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

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::Particle::resetDimensions().

◆ _notifyOwner()

void Ogre::Particle::_notifyOwner ( ParticleSystem owner)
inherited

Internal method for notifying the particle of it's owner.

◆ _notifyVisualData()

void Ogre::Particle::_notifyVisualData ( ParticleVisualData vis)
inlineinherited

Internal method for notifying the particle of it's optional visual data.

◆ cleanupDictionary()

static void Ogre::StringInterface::cleanupDictionary ( )
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.

◆ copyParametersTo()

virtual void Ogre::StringInterface::copyParametersTo ( StringInterface dest) const
inlinevirtualinherited

Method for copying this object's parameters to another object.

Remarks
This method takes the values of all the object's parameters and tries to set the same values on the destination object. This provides a completely type independent way to copy parameters to other objects. Note that because of the String manipulation involved, this should not be regarded as an efficient process and should be saved for times outside of the rendering loop.
Any unrecognised parameters will be ignored as with setParameter method.
Parameters
destPointer to object to have it's parameters set the same as this object.

References Ogre::StringInterface::setParameter().

◆ getAngle()

virtual const Radian& Ogre::ParticleEmitter::getAngle ( ) const
virtualinherited

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

◆ getColour()

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

Gets the colour of particles to be emitted.

◆ getColourRangeEnd()

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

Gets the maximum colour of particles to be emitted.

◆ getColourRangeStart()

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

Gets the minimum colour of particles to be emitted.

◆ getDepth()

Real Ogre::AreaEmitter::getDepth ( ) const

Gets the depth (local y size) of the emitter.

◆ getDirection()

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

Returns the base direction of the emitter.

◆ getDirPositionReference()

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

Returns the position reference to generate direction of emitted particles.

◆ getDirPositionReferenceEnabled()

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

Returns whether direction or position reference is used.

◆ getDuration()

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

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

◆ getEmissionRate()

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

Returns the emission rate set for this emitter.

◆ getEmittedEmitter()

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

Returns the name of the emitter to be emitted.

◆ getEnabled()

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

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

◆ getHeight()

Real Ogre::AreaEmitter::getHeight ( ) const

Gets the height (local y size) of the emitter.

◆ getMaxDuration()

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

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

◆ getMaxParticleVelocity()

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

Returns the maximum particle velocity.

◆ getMaxRepeatDelay()

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

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

◆ getMaxTimeToLive()

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

Gets the maximum time each particle will live for.

◆ getMinDuration()

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

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

◆ getMinParticleVelocity()

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

Returns the minimum particle velocity.

◆ getMinRepeatDelay()

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

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

◆ getMinTimeToLive()

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

Gets the minimum time each particle will live for.

◆ getName()

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

Returns the name of the emitter.

◆ getOwnHeight()

Real Ogre::Particle::getOwnHeight ( ) const
inlineinherited

Retrieves the particle's personal width, if hasOwnDimensions is true.

◆ getOwnWidth()

Real Ogre::Particle::getOwnWidth ( ) const
inlineinherited

Retrieves the particle's personal width, if hasOwnDimensions is true.

◆ getParamDictionary() [1/2]

ParamDictionary* Ogre::StringInterface::getParamDictionary ( )
inlineinherited

Retrieves the parameter dictionary for this class.

Remarks
Only valid to call this after createParamDictionary.
Returns
Pointer to ParamDictionary shared by all instances of this class which you can add parameters to, retrieve parameters etc.

◆ getParamDictionary() [2/2]

const ParamDictionary* Ogre::StringInterface::getParamDictionary ( ) const
inlineinherited

◆ getParameter()

virtual String Ogre::StringInterface::getParameter ( const String name) const
inlinevirtualinherited

Generic parameter retrieval method.

Remarks
Call this method with the name of a parameter to retrieve a string-format value of the parameter in question. If in doubt, check the parameter definition in the list returned from getParameters for the type of this parameter. If you like you can use StringConverter to convert this string back into a native type.
Parameters
nameThe name of the parameter to get
Returns
String value of parameter, blank if not found

References Ogre::ParamCommand::doGet().

◆ getParameters()

const ParameterList& Ogre::StringInterface::getParameters ( ) const
inherited

Retrieves a list of parameters valid for this object.

Returns
A reference to a static list of ParameterDef objects.

◆ getParticleVelocity()

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

Returns the initial velocity of particles emitted.

◆ getPosition()

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

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

◆ getRepeatDelay()

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

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

◆ getRotation()

const Radian& Ogre::Particle::getRotation ( ) const
inlineinherited

◆ getStartTime()

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

Gets the start time of the emitter.

◆ getTimeToLive()

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

Gets the time each particle will live for.

◆ getType()

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

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.

◆ getUp()

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

Returns the up vector of the emitter.

◆ getVisualData()

ParticleVisualData* Ogre::Particle::getVisualData ( ) const
inlineinherited

Get the optional visual data associated with the class.

◆ getWidth()

Real Ogre::AreaEmitter::getWidth ( ) const

Gets the width (local x size) of the emitter.

◆ hasOwnDimensions()

bool Ogre::Particle::hasOwnDimensions ( ) const
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).

See also
particle::setDimensions

◆ isEmitted()

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

Return true if the emitter is emitted by another emitter.

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

◆ resetDimensions()

void Ogre::Particle::resetDimensions ( )
inherited

Utility method to reset this particle.

Referenced by Ogre::ParticleEmitter::_initParticle().

◆ setAngle()

virtual void Ogre::ParticleEmitter::setAngle ( const Radian angle)
virtualinherited

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.

◆ setColour() [1/2]

virtual void Ogre::ParticleEmitter::setColour ( const ColourValue colour)
virtualinherited

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

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

◆ setColourRangeEnd()

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

Sets the maximum colour of particles to be emitted.

◆ setColourRangeStart()

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

Sets the minimum colour of particles to be emitted.

◆ setDepth()

void Ogre::AreaEmitter::setDepth ( Real  Depth)

Sets the depth (local y size) of the emitter.

◆ setDimensions()

void Ogre::Particle::setDimensions ( Real  width,
Real  height 
)
inherited

Sets the width and height for this particle.

Remarks
Note that it is most efficient for every particle in a ParticleSystem to have the same dimensions. If you choose to alter the dimensions of an individual particle the set will be less efficient. Do not call this method unless you really need to have different particle dimensions within the same set. Otherwise just call the ParticleSystem::setDefaultDimensions method instead.

◆ setDirection()

void Ogre::AreaEmitter::setDirection ( const Vector3 direction)
virtual

Overloaded to update the trans.

matrix

Reimplemented from Ogre::ParticleEmitter.

◆ setDirPositionReference()

virtual void Ogre::ParticleEmitter::setDirPositionReference ( const Vector3 position,
bool  enable 
)
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)

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

◆ setDuration() [1/2]

virtual void Ogre::ParticleEmitter::setDuration ( Real  duration)
virtualinherited

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.

◆ setDuration() [2/2]

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

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.

◆ setEmissionRate()

virtual void Ogre::ParticleEmitter::setEmissionRate ( Real  particlesPerSecond)
virtualinherited

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.

◆ setEmitted()

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

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

◆ setEmittedEmitter()

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

Sets the name of the emitter to be emitted.

◆ setEnabled()

virtual void Ogre::ParticleEmitter::setEnabled ( bool  enabled)
virtualinherited

Sets whether or not the emitter is enabled.

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

◆ setHeight()

void Ogre::AreaEmitter::setHeight ( Real  Height)

Sets the height (local y size) of the emitter.

◆ setMaxDuration()

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

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

◆ setMaxParticleVelocity()

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

Returns the maximum particle velocity.

◆ setMaxRepeatDelay()

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

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

◆ setMaxTimeToLive()

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

Sets the maximum time each particle will live for.

Must be non-negative!

◆ setMinDuration()

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

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

◆ setMinParticleVelocity()

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

Returns the minimum particle velocity.

◆ setMinRepeatDelay()

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

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

◆ setMinTimeToLive()

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

Sets the minimum time each particle will live for.

Must be non-negative!

◆ setName()

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

Sets the name of the emitter.

◆ setParameter()

virtual bool Ogre::StringInterface::setParameter ( const String name,
const String value 
)
virtualinherited

Generic parameter setting method.

Remarks
Call this method with the name of a parameter and a string version of the value to set. The implementor will convert the string to a native type internally. If in doubt, check the parameter definition in the list returned from StringInterface::getParameters.
Parameters
nameThe name of the parameter to set
valueString value. Must be in the right format for the type specified in the parameter definition. See the StringConverter class for more information.
Returns
true if set was successful, false otherwise (NB no exceptions thrown - tolerant method)

Referenced by Ogre::StringInterface::copyParametersTo().

◆ setParameterList()

virtual void Ogre::StringInterface::setParameterList ( const NameValuePairList paramList)
virtualinherited

Generic multiple parameter setting method.

Remarks
Call this method with a list of name / value pairs to set. The implementor will convert the string to a native type internally. If in doubt, check the parameter definition in the list returned from StringInterface::getParameters.
Parameters
paramListName/value pair list

◆ setParticleVelocity() [1/2]

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

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.

◆ setParticleVelocity() [2/2]

virtual void Ogre::ParticleEmitter::setParticleVelocity ( Real  speed)
virtualinherited

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.

◆ setPosition()

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

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

◆ setRepeatDelay() [1/2]

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

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.

◆ setRepeatDelay() [2/2]

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

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.

◆ setRotation()

void Ogre::Particle::setRotation ( const Radian rad)
inherited

Sets the current rotation.

◆ setSize() [1/2]

void Ogre::AreaEmitter::setSize ( const Vector3 size)

Sets the size of the area from which particles are emitted.

Parameters
sizeVector 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)

◆ setSize() [2/2]

void Ogre::AreaEmitter::setSize ( Real  x,
Real  y,
Real  z 
)

Sets the size of the area from which particles are emitted.

Parameters
x,y,zIndividual 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)

◆ setStartTime()

virtual void Ogre::ParticleEmitter::setStartTime ( Real  startTime)
virtualinherited

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.

◆ setTimeToLive() [1/2]

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

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!

◆ setTimeToLive() [2/2]

virtual void Ogre::ParticleEmitter::setTimeToLive ( Real  ttl)
virtualinherited

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.

◆ setUp()

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

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.

◆ setWidth()

void Ogre::AreaEmitter::setWidth ( Real  width)

Sets the width (local x size) of the emitter.

Member Data Documentation

◆ mColour

ColourValue Ogre::Particle::mColour
inherited

Current colour.

◆ mHeight

Real Ogre::Particle::mHeight
inherited

Personal height if mOwnDimensions == true.

◆ mOwnDimensions

bool Ogre::Particle::mOwnDimensions
inherited

Does this particle have it's own dimensions?

◆ mParticleType

ParticleType Ogre::Particle::mParticleType
inherited

Determines the type of particle.

◆ mRotation

Radian Ogre::Particle::mRotation
inherited

Current rotation value.

◆ mRotationSpeed

Radian Ogre::Particle::mRotationSpeed
inherited

Speed of rotation in radians/sec.

◆ mTimeToLive

Real Ogre::Particle::mTimeToLive
inherited

Time to live, number of seconds left of particles natural life.

◆ mTotalTimeToLive

Real Ogre::Particle::mTotalTimeToLive
inherited

Total Time to live, number of seconds of particles natural life.

◆ mWidth

Real Ogre::Particle::mWidth
inherited

Personal width if mOwnDimensions == true.


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