Loading...
Searching...
No Matches
Ogre::ParticleAffectorFactory Class Referenceabstract
Core » Effects

Abstract class defining the interface to be implemented by creators of ParticleAffector subclasses. More...

`#include <OgreParticleAffectorFactory.h>`

Inheritance diagram for Ogre::ParticleAffectorFactory:
[legend]

## Public Member Functions

| ParticleAffectorFactory ()
virtual | ~ParticleAffectorFactory ()
virtual ParticleAffector * | createAffector (ParticleSystem *psys)=0
| Creates a new affector instance.
virtual void | destroyAffector (ParticleAffector *e)
| Destroys the affector pointed to by the parameter (for early clean up if required).
virtual String | getName () const =0
| Returns the name of the factory, the name which identifies the particle affector type this factory creates.

## Detailed Description

Abstract class defining the interface to be implemented by creators of ParticleAffector subclasses.

Plugins or 3rd party applications can add new types of particle affectors to Ogre by creating subclasses of the ParticleAffector class. Because multiple instances of these affectors may be required, a factory class to manage the instances is also required.

  ParticleAffectorFactory subclasses must allow the creation and destruction of ParticleAffector subclasses. They must also be registered with the ParticleSystemManager. All factories have a name which identifies them, examples might be 'force_vector', 'attractor', or 'fader', and these can be also be used from particle system scripts.

## Constructor & Destructor Documentation

## ParticleAffectorFactory()

Ogre::ParticleAffectorFactory::ParticleAffectorFactory | ( |  | ) |

inline

## ~ParticleAffectorFactory()

virtual Ogre::ParticleAffectorFactory::~ParticleAffectorFactory | ( |  | ) |

virtual

## Member Function Documentation

## getName()

virtual String Ogre::ParticleAffectorFactory::getName | ( |  | ) | const

pure virtual

Returns the name of the factory, the name which identifies the particle affector type this factory creates.

## createAffector()

virtual ParticleAffector * Ogre::ParticleAffectorFactory::createAffector | ( | ParticleSystem * | psys | ) |

pure virtual

Creates a new affector instance.

The subclass MUST add a pointer to the created instance to mAffectors.

## destroyAffector()

virtual void Ogre::ParticleAffectorFactory::destroyAffector | ( | ParticleAffector * | e | ) |

virtual

Destroys the affector pointed to by the parameter (for early clean up if required).

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

- OgreParticleAffectorFactory.h