Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::ParticleAffectorFactory Class Reference

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

#include <OgreParticleAffectorFactory.h>

Inheritance diagram for Ogre::ParticleAffectorFactory:

Inheritance graph
[legend]
List of all members.

Public Methods

 ParticleAffectorFactory ()
virtual ~ParticleAffectorFactory ()
virtual String getName () const=0
 Returns the name of the factory, the name which identifies the particle affector type this factory creates.

virtual ParticleAffectorcreateAffector (void)=0
 Creates a new affector instance.

virtual void destroyAffector (ParticleAffector *e)
 Destroys the affector pointed to by the parameter (for early clean up if reauired).


Protected Attributes

std::vector< ParticleAffector * > mAffectors

Detailed Description

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

Remarks:
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.

Definition at line 45 of file OgreParticleAffectorFactory.h.


Constructor & Destructor Documentation

Ogre::ParticleAffectorFactory::ParticleAffectorFactory  
 

Definition at line 50 of file OgreParticleAffectorFactory.h.

virtual Ogre::ParticleAffectorFactory::~ParticleAffectorFactory   [virtual]
 

Definition at line 51 of file OgreParticleAffectorFactory.h.


Member Function Documentation

virtual ParticleAffector* Ogre::ParticleAffectorFactory::createAffector void    [pure virtual]
 

Creates a new affector instance.

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

Implemented in Ogre::ColourFaderAffectorFactory, Ogre::ColourFaderAffectorFactory2, Ogre::ColourImageAffectorFactory, Ogre::ColourInterpolatorAffectorFactory, Ogre::LinearForceAffectorFactory, Ogre::RotationAffectorFactory, and Ogre::ScaleAffectorFactory.

virtual void Ogre::ParticleAffectorFactory::destroyAffector ParticleAffector   e [virtual]
 

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

Definition at line 74 of file OgreParticleAffectorFactory.h.

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.

Implemented in Ogre::ColourFaderAffectorFactory, Ogre::ColourFaderAffectorFactory2, Ogre::ColourImageAffectorFactory, Ogre::ColourInterpolatorAffectorFactory, Ogre::LinearForceAffectorFactory, Ogre::RotationAffectorFactory, and Ogre::ScaleAffectorFactory.

Referenced by Ogre::ParticleSystemManager::addAffectorFactory().


Member Data Documentation

std::vector<ParticleAffector*> Ogre::ParticleAffectorFactory::mAffectors [protected]
 

Definition at line 48 of file OgreParticleAffectorFactory.h.


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

Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:26:45 2004