#include <OgreParticleSystemManager.h>
Inheritance diagram for Ogre::ParticleSystemManager:
Public Methods | |
ParticleSystemManager () | |
virtual | ~ParticleSystemManager () |
void | addEmitterFactory (ParticleEmitterFactory *factory) |
Adds a new 'factory' object for emitters to the list of available emitter types. More... | |
void | addAffectorFactory (ParticleAffectorFactory *factory) |
Adds a new 'factory' object for affectors to the list of available affector types. More... | |
void | addTemplate (const String &name, const ParticleSystem &sysTemplate) |
Adds a new particle system template to the list of available templates. More... | |
ParticleSystem * | createTemplate (const String &name) |
Create a new particle system template. More... | |
ParticleSystem * | getTemplate (const String &name) |
Retrieves a particle system template for possible modification. More... | |
ParticleSystem * | createSystem (const String &name, unsigned int quota=500) |
Basic method for creating a blank particle system. More... | |
ParticleSystem * | createSystem (const String &name, const String &templateName, unsigned int quota=500) |
Creates a particle system based on a template. More... | |
void | destroySystem (const String &name) |
Destroys a particle system, freeing it's memory and removing references to it in this class. More... | |
void | destroySystem (ParticleSystem *sys) |
Destroys a particle system, freeing it's memory and removing references to it in this class. More... | |
ParticleSystem * | getSystem (const String &name) |
Retrieves a pointer to a system already created. More... | |
ParticleEmitter * | _createEmitter (const String &emitterType) |
Internal method for creating a new emitter from a factory. More... | |
void | _destroyEmitter (ParticleEmitter *emitter) |
Internal method for destroying an emitter. More... | |
ParticleAffector * | _createAffector (const String &affectorType) |
Internal method for creating a new affector from a factory. More... | |
void | _destroyAffector (ParticleAffector *affector) |
Internal method for destroying an affector. More... | |
bool | frameStarted (const FrameEvent &evt) |
Frame event. More... | |
bool | frameEnded (const FrameEvent &evt) |
Frame event. More... | |
void | _initialise (void) |
Init method to be called by OGRE system. More... | |
void | parseScript (DataChunk &chunk) |
Parses a particle system script file passed as a chunk. More... | |
void | parseAllSources (const String &extension=".particle") |
Parses all particle system script files in resource folders & archives. More... | |
Real | getTimeFactor (void) |
Return relative speed of time as perceived by particle systems. More... | |
void | setTimeFactor (Real tf) |
Set the relative speed of time as perceived by particle systems. More... | |
Static Public Methods | |
ParticleSystemManager & | getSingleton (void) |
Override standard Singleton retrieval. More... | |
ParticleSystemManager * | getSingletonPtr (void) |
Protected Types | |
typedef std::map< String, ParticleSystem > | ParticleTemplateMap |
typedef std::map< String, ParticleSystem * > | ParticleSystemMap |
typedef std::map< String, ParticleEmitterFactory * > | ParticleEmitterFactoryMap |
typedef std::map< String, ParticleAffectorFactory * > | ParticleAffectorFactoryMap |
Protected Methods | |
void | parseNewEmitter (const String &type, DataChunk &chunk, ParticleSystem *sys) |
Internal script parsing method. More... | |
void | parseNewAffector (const String &type, DataChunk &chunk, ParticleSystem *sys) |
Internal script parsing method. More... | |
void | parseAttrib (const String &line, ParticleSystem *sys) |
Internal script parsing method. More... | |
void | parseEmitterAttrib (const String &line, ParticleEmitter *sys) |
Internal script parsing method. More... | |
void | parseAffectorAttrib (const String &line, ParticleAffector *sys) |
Internal script parsing method. More... | |
void | skipToNextCloseBrace (DataChunk &chunk) |
Internal script parsing method. More... | |
void | skipToNextOpenBrace (DataChunk &chunk) |
Internal script parsing method. More... | |
Protected Attributes | |
ParticleTemplateMap | mSystemTemplates |
Templates based on scripts. More... | |
ParticleSystemMap | mSystems |
Actual instantiated particle systems (may be based on template, may be manual). More... | |
ParticleEmitterFactoryMap | mEmitterFactories |
Factories for named emitter types (can be extended using plugins). More... | |
ParticleAffectorFactoryMap | mAffectorFactories |
Factories for named affector types (can be extended using plugins). More... | |
Real | mTimeFactor |
Controls time. More... | |
Static Protected Attributes | |
ParticleSystemManager * | ms_Singleton = 0 |
This class also manages factories for ParticleEmitter and ParticleAffector classes. To enable easy extensions to the types of emitters (particle sources) and affectors (particle modifiers), the ParticleSystemManager lets plugins or applications register factory classes which submit new subclasses to ParticleEmitter and ParticleAffector. Ogre comes with a number of them already provided, such as cone, sphere and box-shaped emitters, and simple affectors such as constant directional force and colour faders. However using this registration process, a plugin can create any behaviour required.
This class also manages the loading and parsing of particle system scripts, which are text files describing named particle system templates. Instances of particle systems using these templates can then be created easily through the createParticleSystem method.
|
|
|
|
|
|
|
|
|
|
|
|
|
Internal method for creating a new affector from a factory.
|
|
Internal method for creating a new emitter from a factory.
|
|
Internal method for destroying an affector.
|
|
Internal method for destroying an emitter.
|
|
Init method to be called by OGRE system.
|
|
Adds a new 'factory' object for affectors to the list of available affector types.
|
|
Adds a new 'factory' object for emitters to the list of available emitter types.
|
|
Adds a new particle system template to the list of available templates.
|
|
Creates a particle system based on a template.
|
|
Basic method for creating a blank particle system.
|
|
Create a new particle system template.
|
|
Destroys a particle system, freeing it's memory and removing references to it in this class.
|
|
Destroys a particle system, freeing it's memory and removing references to it in this class.
|
|
Frame event.
Reimplemented from Ogre::FrameListener. |
|
Frame event.
Reimplemented from Ogre::FrameListener. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< ParticleSystemManager >. |
|
|
|
Retrieves a pointer to a system already created.
|
|
Retrieves a particle system template for possible modification.
|
|
Return relative speed of time as perceived by particle systems.
|
|
Internal script parsing method.
|
|
Parses all particle system script files in resource folders & archives.
|
|
Internal script parsing method.
|
|
Internal script parsing method.
|
|
Internal script parsing method.
|
|
Internal script parsing method.
|
|
Parses a particle system script file passed as a chunk.
|
|
Set the relative speed of time as perceived by particle systems.
|
|
Internal script parsing method.
|
|
Internal script parsing method.
|
|
Factories for named affector types (can be extended using plugins).
|
|
Factories for named emitter types (can be extended using plugins).
|
|
|
|
Actual instantiated particle systems (may be based on template, may be manual).
|
|
Templates based on scripts.
|
|
Controls time.
|
Copyright © 2002 by The OGRE Team