#include <OgreParticleSystemManager.h>
Public Types | |||||||
typedef std::map < String, ParticleSystem * > | ParticleTemplateMap | ||||||
typedef std::map < String, ParticleAffectorFactory * > | ParticleAffectorFactoryMap | ||||||
typedef std::map < String, ParticleEmitterFactory * > | ParticleEmitterFactoryMap | ||||||
typedef std::map < String, ParticleSystemRendererFactory * > | ParticleSystemRendererFactoryMap | ||||||
typedef MapIterator < ParticleAffectorFactoryMap > | ParticleAffectorFactoryIterator | ||||||
typedef MapIterator < ParticleEmitterFactoryMap > | ParticleEmitterFactoryIterator | ||||||
typedef MapIterator < ParticleSystemRendererFactoryMap > | ParticleRendererFactoryIterator | ||||||
typedef MapIterator < ParticleTemplateMap > | ParticleSystemTemplateIterator | ||||||
Public Member Functions | |||||||
ParticleSystemManager () | |||||||
virtual | ~ParticleSystemManager () | ||||||
void | addEmitterFactory (ParticleEmitterFactory *factory) | ||||||
Adds a new 'factory' object for emitters to the list of available emitter types. | |||||||
void | addAffectorFactory (ParticleAffectorFactory *factory) | ||||||
Adds a new 'factory' object for affectors to the list of available affector types. | |||||||
void | addRendererFactory (ParticleSystemRendererFactory *factory) | ||||||
Registers a factory class for creating ParticleSystemRenderer instances. | |||||||
void | addTemplate (const String &name, ParticleSystem *sysTemplate) | ||||||
Adds a new particle system template to the list of available templates. | |||||||
void | removeTemplate (const String &name, bool deleteTemplate=true) | ||||||
Removes a specified template from the ParticleSystemManager. | |||||||
void | removeAllTemplates (bool deleteTemplate=true) | ||||||
Removes a specified template from the ParticleSystemManager. | |||||||
ParticleSystem * | createTemplate (const String &name, const String &resourceGroup) | ||||||
Create a new particle system template. | |||||||
ParticleSystem * | getTemplate (const String &name) | ||||||
Retrieves a particle system template for possible modification. | |||||||
ParticleEmitter * | _createEmitter (const String &emitterType, ParticleSystem *psys) | ||||||
Internal method for creating a new emitter from a factory. | |||||||
void | _destroyEmitter (ParticleEmitter *emitter) | ||||||
Internal method for destroying an emitter. | |||||||
ParticleAffector * | _createAffector (const String &affectorType, ParticleSystem *psys) | ||||||
Internal method for creating a new affector from a factory. | |||||||
void | _destroyAffector (ParticleAffector *affector) | ||||||
Internal method for destroying an affector. | |||||||
ParticleSystemRenderer * | _createRenderer (const String &rendererType) | ||||||
Internal method for creating a new renderer from a factory. | |||||||
void | _destroyRenderer (ParticleSystemRenderer *renderer) | ||||||
Internal method for destroying a renderer. | |||||||
void | _initialise (void) | ||||||
Init method to be called by OGRE system. | |||||||
const StringVector & | getScriptPatterns (void) const | ||||||
Gets the file patterns which should be used to find scripts for this class.
| |||||||
void | parseScript (DataStreamPtr &stream, const String &groupName) | ||||||
Parse a script file.
| |||||||
Real | getLoadingOrder (void) const | ||||||
Gets the relative loading order of scripts of this type.
| |||||||
ParticleAffectorFactoryIterator | getAffectorFactoryIterator (void) | ||||||
Return an iterator over the affector factories currently registered. | |||||||
ParticleEmitterFactoryIterator | getEmitterFactoryIterator (void) | ||||||
Return an iterator over the emitter factories currently registered. | |||||||
ParticleRendererFactoryIterator | getRendererFactoryIterator (void) | ||||||
Return an iterator over the renderer factories currently registered. | |||||||
ParticleSystemTemplateIterator | getTemplateIterator (void) | ||||||
Gets an iterator over the list of particle system templates. | |||||||
ParticleSystemFactory * | _getFactory (void) | ||||||
Get an instance of ParticleSystemFactory (internal use). | |||||||
Static Public Member Functions | |||||||
static ParticleSystemManager & | getSingleton (void) | ||||||
Override standard Singleton retrieval. | |||||||
static ParticleSystemManager * | getSingletonPtr (void) | ||||||
Override standard Singleton retrieval. | |||||||
Protected Member Functions | |||||||
void | parseNewEmitter (const String &type, DataStreamPtr &chunk, ParticleSystem *sys) | ||||||
Internal script parsing method. | |||||||
void | parseNewAffector (const String &type, DataStreamPtr &chunk, ParticleSystem *sys) | ||||||
Internal script parsing method. | |||||||
void | parseAttrib (const String &line, ParticleSystem *sys) | ||||||
Internal script parsing method. | |||||||
void | parseEmitterAttrib (const String &line, ParticleEmitter *sys) | ||||||
Internal script parsing method. | |||||||
void | parseAffectorAttrib (const String &line, ParticleAffector *sys) | ||||||
Internal script parsing method. | |||||||
void | skipToNextCloseBrace (DataStreamPtr &chunk) | ||||||
Internal script parsing method. | |||||||
void | skipToNextOpenBrace (DataStreamPtr &chunk) | ||||||
Internal script parsing method. | |||||||
ParticleSystem * | createSystemImpl (const String &name, size_t quota, const String &resourceGroup) | ||||||
Internal implementation of createSystem. | |||||||
ParticleSystem * | createSystemImpl (const String &name, const String &templateName) | ||||||
Internal implementation of createSystem. | |||||||
void | destroySystemImpl (ParticleSystem *sys) | ||||||
Internal implementation of destroySystem. | |||||||
Protected Attributes | |||||||
OGRE_AUTO_MUTEX ParticleTemplateMap | mSystemTemplates | ||||||
Templates based on scripts. | |||||||
ParticleEmitterFactoryMap | mEmitterFactories | ||||||
Factories for named emitter types (can be extended using plugins). | |||||||
ParticleAffectorFactoryMap | mAffectorFactories | ||||||
Factories for named affector types (can be extended using plugins). | |||||||
ParticleSystemRendererFactoryMap | mRendererFactories | ||||||
Map of renderer types to factories. | |||||||
StringVector | mScriptPatterns | ||||||
ParticleSystemFactory * | mFactory | ||||||
Static Protected Attributes | |||||||
static T * | ms_Singleton | ||||||
Friends | |||||||
class | ParticleSystemFactory |
Definition at line 71 of file OgreParticleSystemManager.h.
typedef std::map<String, ParticleSystem*> Ogre::ParticleSystemManager::ParticleTemplateMap |
Definition at line 76 of file OgreParticleSystemManager.h.
typedef std::map<String, ParticleAffectorFactory*> Ogre::ParticleSystemManager::ParticleAffectorFactoryMap |
Definition at line 77 of file OgreParticleSystemManager.h.
typedef std::map<String, ParticleEmitterFactory*> Ogre::ParticleSystemManager::ParticleEmitterFactoryMap |
Definition at line 78 of file OgreParticleSystemManager.h.
typedef std::map<String, ParticleSystemRendererFactory*> Ogre::ParticleSystemManager::ParticleSystemRendererFactoryMap |
Definition at line 79 of file OgreParticleSystemManager.h.
typedef MapIterator<ParticleAffectorFactoryMap> Ogre::ParticleSystemManager::ParticleAffectorFactoryIterator |
Definition at line 313 of file OgreParticleSystemManager.h.
typedef MapIterator<ParticleEmitterFactoryMap> Ogre::ParticleSystemManager::ParticleEmitterFactoryIterator |
Definition at line 314 of file OgreParticleSystemManager.h.
typedef MapIterator<ParticleSystemRendererFactoryMap> Ogre::ParticleSystemManager::ParticleRendererFactoryIterator |
Definition at line 315 of file OgreParticleSystemManager.h.
typedef MapIterator<ParticleTemplateMap> Ogre::ParticleSystemManager::ParticleSystemTemplateIterator |
Definition at line 324 of file OgreParticleSystemManager.h.
Ogre::ParticleSystemManager::ParticleSystemManager | ( | ) |
virtual Ogre::ParticleSystemManager::~ParticleSystemManager | ( | ) | [virtual] |
void Ogre::ParticleSystemManager::parseNewEmitter | ( | const String & | type, | |
DataStreamPtr & | chunk, | |||
ParticleSystem * | sys | |||
) | [protected] |
Internal script parsing method.
void Ogre::ParticleSystemManager::parseNewAffector | ( | const String & | type, | |
DataStreamPtr & | chunk, | |||
ParticleSystem * | sys | |||
) | [protected] |
Internal script parsing method.
void Ogre::ParticleSystemManager::parseAttrib | ( | const String & | line, | |
ParticleSystem * | sys | |||
) | [protected] |
Internal script parsing method.
void Ogre::ParticleSystemManager::parseEmitterAttrib | ( | const String & | line, | |
ParticleEmitter * | sys | |||
) | [protected] |
Internal script parsing method.
void Ogre::ParticleSystemManager::parseAffectorAttrib | ( | const String & | line, | |
ParticleAffector * | sys | |||
) | [protected] |
Internal script parsing method.
void Ogre::ParticleSystemManager::skipToNextCloseBrace | ( | DataStreamPtr & | chunk | ) | [protected] |
Internal script parsing method.
void Ogre::ParticleSystemManager::skipToNextOpenBrace | ( | DataStreamPtr & | chunk | ) | [protected] |
Internal script parsing method.
ParticleSystem* Ogre::ParticleSystemManager::createSystemImpl | ( | const String & | name, | |
size_t | quota, | |||
const String & | resourceGroup | |||
) | [protected] |
Internal implementation of createSystem.
ParticleSystem* Ogre::ParticleSystemManager::createSystemImpl | ( | const String & | name, | |
const String & | templateName | |||
) | [protected] |
Internal implementation of createSystem.
void Ogre::ParticleSystemManager::destroySystemImpl | ( | ParticleSystem * | sys | ) | [protected] |
Internal implementation of destroySystem.
void Ogre::ParticleSystemManager::addEmitterFactory | ( | ParticleEmitterFactory * | factory | ) |
Adds a new 'factory' object for emitters to the list of available emitter types.
factory | Pointer to a ParticleEmitterFactory subclass created by the plugin or application code. |
void Ogre::ParticleSystemManager::addAffectorFactory | ( | ParticleAffectorFactory * | factory | ) |
Adds a new 'factory' object for affectors to the list of available affector types.
factory | Pointer to a ParticleAffectorFactory subclass created by the plugin or application code. |
void Ogre::ParticleSystemManager::addRendererFactory | ( | ParticleSystemRendererFactory * | factory | ) |
Registers a factory class for creating ParticleSystemRenderer instances.
factory | Pointer to a ParticleSystemRendererFactory subclass created by the plugin or application code. |
void Ogre::ParticleSystemManager::addTemplate | ( | const String & | name, | |
ParticleSystem * | sysTemplate | |||
) |
Adds a new particle system template to the list of available templates.
name | The name of the template. Must be unique across all templates. | |
sysTemplate | A pointer to a particle system to be used as a template. The manager will take over ownership of this pointer. |
void Ogre::ParticleSystemManager::removeTemplate | ( | const String & | name, | |
bool | deleteTemplate = true | |||
) |
Removes a specified template from the ParticleSystemManager.
name | The name of the template to remove. | |
deleteTemplate | Whether or not to delete the template before removing it. |
void Ogre::ParticleSystemManager::removeAllTemplates | ( | bool | deleteTemplate = true |
) |
Removes a specified template from the ParticleSystemManager.
deleteTemplate | Whether or not to delete the templates before removing them. |
ParticleSystem* Ogre::ParticleSystemManager::createTemplate | ( | const String & | name, | |
const String & | resourceGroup | |||
) |
Create a new particle system template.
name | The name of the template. Must be unique across all templates. | |
resourceGroup | The name of the resource group which will be used to load any dependent resources. |
ParticleSystem* Ogre::ParticleSystemManager::getTemplate | ( | const String & | name | ) |
Retrieves a particle system template for possible modification.
ParticleEmitter* Ogre::ParticleSystemManager::_createEmitter | ( | const String & | emitterType, | |
ParticleSystem * | psys | |||
) |
Internal method for creating a new emitter from a factory.
emitterType | String name of the emitter type to be created. A factory of this type must have been registered. | |
psys | The particle system this is being created for |
void Ogre::ParticleSystemManager::_destroyEmitter | ( | ParticleEmitter * | emitter | ) |
Internal method for destroying an emitter.
emitter | Pointer to emitter to be destroyed. On return this pointer will point to invalid (freed) memory. |
ParticleAffector* Ogre::ParticleSystemManager::_createAffector | ( | const String & | affectorType, | |
ParticleSystem * | psys | |||
) |
Internal method for creating a new affector from a factory.
effectorType | String name of the affector type to be created. A factory of this type must have been registered. | |
psys | The particle system it is being created for |
void Ogre::ParticleSystemManager::_destroyAffector | ( | ParticleAffector * | affector | ) |
Internal method for destroying an affector.
affector | Pointer to affector to be destroyed. On return this pointer will point to invalid (freed) memory. |
ParticleSystemRenderer* Ogre::ParticleSystemManager::_createRenderer | ( | const String & | rendererType | ) |
Internal method for creating a new renderer from a factory.
rendererType | String name of the renderer type to be created. A factory of this type must have been registered. |
void Ogre::ParticleSystemManager::_destroyRenderer | ( | ParticleSystemRenderer * | renderer | ) |
Internal method for destroying a renderer.
renderer | Pointer to renderer to be destroyed. On return this pointer will point to invalid (freed) memory. |
void Ogre::ParticleSystemManager::_initialise | ( | void | ) |
Init method to be called by OGRE system.
const StringVector& Ogre::ParticleSystemManager::getScriptPatterns | ( | void | ) | const [virtual] |
Gets the file patterns which should be used to find scripts for this class.
Implements Ogre::ScriptLoader.
void Ogre::ParticleSystemManager::parseScript | ( | DataStreamPtr & | stream, | |
const String & | groupName | |||
) | [virtual] |
Parse a script file.
stream | Weak reference to a data stream which is the source of the script | |
groupName | The name of a resource group which should be used if any resources are created during the parse of this script. |
Implements Ogre::ScriptLoader.
Real Ogre::ParticleSystemManager::getLoadingOrder | ( | void | ) | const [virtual] |
Gets the relative loading order of scripts of this type.
Implements Ogre::ScriptLoader.
ParticleAffectorFactoryIterator Ogre::ParticleSystemManager::getAffectorFactoryIterator | ( | void | ) |
Return an iterator over the affector factories currently registered.
ParticleEmitterFactoryIterator Ogre::ParticleSystemManager::getEmitterFactoryIterator | ( | void | ) |
Return an iterator over the emitter factories currently registered.
ParticleRendererFactoryIterator Ogre::ParticleSystemManager::getRendererFactoryIterator | ( | void | ) |
Return an iterator over the renderer factories currently registered.
ParticleSystemTemplateIterator Ogre::ParticleSystemManager::getTemplateIterator | ( | void | ) |
Gets an iterator over the list of particle system templates.
Definition at line 326 of file OgreParticleSystemManager.h.
ParticleSystemFactory* Ogre::ParticleSystemManager::_getFactory | ( | void | ) |
Get an instance of ParticleSystemFactory (internal use).
Definition at line 333 of file OgreParticleSystemManager.h.
static ParticleSystemManager& Ogre::ParticleSystemManager::getSingleton | ( | void | ) | [static] |
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< T >.
static ParticleSystemManager* Ogre::ParticleSystemManager::getSingletonPtr | ( | void | ) | [static] |
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< T >.
friend class ParticleSystemFactory [friend] |
Definition at line 74 of file OgreParticleSystemManager.h.
OGRE_AUTO_MUTEX ParticleTemplateMap Ogre::ParticleSystemManager::mSystemTemplates [protected] |
Factories for named emitter types (can be extended using plugins).
Definition at line 86 of file OgreParticleSystemManager.h.
Factories for named affector types (can be extended using plugins).
Definition at line 89 of file OgreParticleSystemManager.h.
Definition at line 94 of file OgreParticleSystemManager.h.
Definition at line 97 of file OgreParticleSystemManager.h.
T* Ogre::Singleton< T >::ms_Singleton [static, protected, inherited] |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat May 10 16:27:39 2008