OGRE-Next: Ogre::ParticleAffector Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ogre::ParticleAffector Class Referenceabstract
Core » Effects

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

`#include <OgreParticleAffector.h>`

Inheritance diagram for Ogre::ParticleAffector:
[legend]

## Public Member Functions
| ParticleAffector (ParticleSystem *parent)
virtual | ~ParticleAffector ()
| Virtual destructor essential.
virtual void | _affectParticles (ParticleSystem *pSystem, Real timeElapsed)=0
| Method called to allow the affector to 'do it's stuff' on all active particles in the system.
virtual void | _initParticle (Particle *pParticle)
| Method called to allow the affector to initialize all newly created particles in the system.
const String & | getType () const
| Returns the name of the type of affector.
Public Member Functions inherited from Ogre::StringInterface
| StringInterface ()
virtual | ~StringInterface ()
| Virtual destructor, see Effective C++.
virtual void | copyParametersTo (StringInterface *dest) const
| Method for copying this object's parameters to another object.
ParamDictionary * | getParamDictionary ()
| Retrieves the parameter dictionary for this class.
const ParamDictionary * | getParamDictionary () const
virtual String | getParameter (const String &name) const
| Generic parameter retrieval method.
const ParameterList & | getParameters () const
| Retrieves a list of parameters valid for this object.
virtual bool | setParameter (const String &name, const String &value)
| Generic parameter setting method.
virtual void | setParameterList (const NameValuePairList &paramList)
| Generic multiple parameter setting method.

## Additional Inherited Members
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.

## Detailed Description

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

Remarks
  Particle affectors modify particles in a particle system over their lifetime. They can be grouped into types, e.g. 'vector force' affectors, 'fader' affectors etc; each type will modify particles in a different way, using different parameters.

  Because there are so many types of affectors 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 affector types available. This is done by subclassing ParticleAffector to have the appropriate emission behaviour you want, and also creating a subclass of ParticleAffectorFactory which is responsible for creating instances of your new affector type. You register this factory with the ParticleSystemManager using addAffectorFactory, and from then on affectors of this type can be created either from code or through text particle scripts by naming the type.

  This same approach is used for ParticleEmitters (which are the source of particles in a system). This means that OGRE is particularly flexible when it comes to creating particle system effects, with literally infinite combinations of affector and affector types, and parameters within those types.

## Constructor & Destructor Documentation

## ◆ ParticleAffector()

Ogre::ParticleAffector::ParticleAffector | ( | ParticleSystem * | parent | ) |
| inline

## ◆ ~ParticleAffector()

virtual Ogre::ParticleAffector::~ParticleAffector | ( |  | ) |
| virtual

Virtual destructor essential.

## Member Function Documentation

## ◆ _affectParticles()

virtual void Ogre::ParticleAffector::_affectParticles | ( | ParticleSystem * | pSystem,
|  | Real | timeElapsed )
| pure virtual

Method called to allow the affector to 'do it's stuff' on all active particles in the system.

Remarks
  This is where the affector gets the chance to apply it's effects to the particles of a system. The affector is expected to apply it's effect to some or all of the particles in the system passed to it, depending on the affector's approach.

Parameters

  pSystem | Pointer to a ParticleSystem to affect.
  timeElapsed | The number of seconds which have elapsed since the last call.

Implemented in Ogre::ColourFaderAffector2, Ogre::ColourFaderAffector, Ogre::ColourImageAffector, Ogre::ColourInterpolatorAffector, Ogre::DeflectorPlaneAffector, Ogre::DirectionRandomiserAffector, Ogre::LinearForceAffector, Ogre::RotationAffector, Ogre::ScaleAffector, and Ogre::ScaleInterpolatorAffector.

## ◆ _initParticle()

virtual void Ogre::ParticleAffector::_initParticle | ( | Particle * | pParticle | ) |
| inlinevirtual

Method called to allow the affector to initialize all newly created particles in the system.

Remarks
  This is where the affector gets the chance to initialize it's effects to the particles of a system. The affector is expected to initialize some or all of the particles in the system passed to it, depending on the affector's approach.

Parameters

  pParticle | Pointer to a Particle to initialize.

Reimplemented in Ogre::ColourImageAffector, Ogre::ColourInterpolatorAffector, Ogre::RotationAffector, and Ogre::ScaleInterpolatorAffector.

## ◆ getType()

const String & Ogre::ParticleAffector::getType | ( |  | ) | const
| inline

Returns the name of the type of affector.

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

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

- OgreParticleAffector.h