OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::ParticleEmitterFactory Class Referenceabstract

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

#include <OgreParticleEmitterFactory.h>

+ Inheritance diagram for Ogre::ParticleEmitterFactory:

Public Member Functions

 ParticleEmitterFactory ()
 
virtual ~ParticleEmitterFactory ()=default
 
virtual ParticleEmittercreateEmitter (ParticleSystem *psys)=0
 Creates a new emitter instance. More...
 
virtual void destroyEmitter (ParticleEmitter *e)
 Destroys the emitter pointed to by the parameter (for early clean up if required). More...
 
virtual String getName () const =0
 Returns the name of the factory, the name which identifies the particle emitter type this factory creates. More...
 

Detailed Description

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

Remarks
Plugins or 3rd party applications can add new types of particle emitters to Ogre by creating subclasses of the ParticleEmitter class. Because multiple instances of these emitters may be required, a factory class to manage the instances is also required.
ParticleEmitterFactory subclasses must allow the creation and destruction of ParticleEmitter subclasses. They must also be registered with the ParticleSystemManager. All factories have a name which identifies them, examples might be 'point', 'cone', or 'box', and these can be also be used from particle system scripts.

Constructor & Destructor Documentation

◆ ParticleEmitterFactory()

Ogre::ParticleEmitterFactory::ParticleEmitterFactory ( )
inline

◆ ~ParticleEmitterFactory()

virtual Ogre::ParticleEmitterFactory::~ParticleEmitterFactory ( )
virtualdefault

Member Function Documentation

◆ createEmitter()

virtual ParticleEmitter* Ogre::ParticleEmitterFactory::createEmitter ( ParticleSystem psys)
pure virtual

Creates a new emitter instance.

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

Implemented in Ogre::RingEmitterFactory, Ogre::PointEmitterFactory, Ogre::HollowEllipsoidEmitterFactory, Ogre::EllipsoidEmitterFactory, Ogre::CylinderEmitterFactory, and Ogre::BoxEmitterFactory.

◆ destroyEmitter()

virtual void Ogre::ParticleEmitterFactory::destroyEmitter ( ParticleEmitter e)
virtual

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

◆ getName()

virtual String Ogre::ParticleEmitterFactory::getName ( ) const
pure virtual

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

Implemented in Ogre::RingEmitterFactory, Ogre::PointEmitterFactory, Ogre::HollowEllipsoidEmitterFactory, Ogre::EllipsoidEmitterFactory, Ogre::CylinderEmitterFactory, and Ogre::BoxEmitterFactory.


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