OGRE  1.12.4
Object-Oriented Graphics Rendering Engine
Ogre::SceneManagerEnumerator Class Reference

Enumerates the SceneManager classes available to applications. More...

#include <OgreSceneManagerEnumerator.h>

+ Inheritance diagram for Ogre::SceneManagerEnumerator:

Public Types

typedef std::map< String, SceneManager * > Instances
 Scene manager instances, indexed by instance name. More...
 
typedef ConstVectorIterator< MetaDataListMetaDataIterator
 
typedef std::vector< const SceneManagerMetaData * > MetaDataList
 List of available scene manager types as meta data. More...
 
typedef MapIterator< InstancesSceneManagerIterator
 

Public Member Functions

 SceneManagerEnumerator ()
 
 ~SceneManagerEnumerator ()
 
void addFactory (SceneManagerFactory *fact)
 Register a new SceneManagerFactory. More...
 
SceneManagercreateSceneManager (const String &typeName, const String &instanceName=BLANKSTRING)
 Create a SceneManager instance of a given type. More...
 
SceneManagercreateSceneManager (SceneTypeMask typeMask, const String &instanceName=BLANKSTRING)
 
void destroySceneManager (SceneManager *sm)
 Destroy an instance of a SceneManager. More...
 
const SceneManagerMetaDatagetMetaData (const String &typeName) const
 Get more information about a given type of SceneManager. More...
 
const MetaDataListgetMetaData () const
 get all types of SceneManager available for construction More...
 
MetaDataIterator getMetaDataIterator (void) const
 Iterate over all types of SceneManager available for construction, providing some information about each one. More...
 
SceneManagergetSceneManager (const String &instanceName) const
 Get an existing SceneManager instance that has already been created, identified by the instance name. More...
 
SceneManagerIterator getSceneManagerIterator (void)
 Get an iterator over all the existing SceneManager instances. More...
 
const InstancesgetSceneManagers () const
 Get all the existing SceneManager instances. More...
 
bool hasSceneManager (const String &instanceName) const
 Identify if a SceneManager instance already exists. More...
 
void removeFactory (SceneManagerFactory *fact)
 Remove a SceneManagerFactory. More...
 
void setRenderSystem (RenderSystem *rs)
 Notifies all SceneManagers of the destination rendering system. More...
 
void shutdownAll (void)
 Utility method to control shutdown of the managers. More...
 

Static Public Member Functions

static SceneManagerEnumeratorgetSingleton (void)
 Get the singleton instance. More...
 
static SceneManagerEnumeratorgetSingletonPtr (void)
 Get the singleton instance. More...
 

Detailed Description

Enumerates the SceneManager classes available to applications.

Remarks
As described in the SceneManager class, SceneManagers are responsible for organising the scene and issuing rendering commands to the RenderSystem. Certain scene types can benefit from different rendering approaches, and it is intended that subclasses will be created to special case this.
In order to give applications easy access to these implementations, this class has a number of methods to create or retrieve a SceneManager which is appropriate to the scene type.
SceneManagers are created by SceneManagerFactory instances. New factories for new types of SceneManager can be registered with this class to make them available to clients.
Note that you can still plug in your own custom SceneManager without using a factory, should you choose, it's just not as flexible that way. Just instantiate your own SceneManager manually and use it directly.

Member Typedef Documentation

◆ Instances

Scene manager instances, indexed by instance name.

◆ MetaDataList

List of available scene manager types as meta data.

◆ MetaDataIterator

◆ SceneManagerIterator

Constructor & Destructor Documentation

◆ SceneManagerEnumerator()

Ogre::SceneManagerEnumerator::SceneManagerEnumerator ( )

◆ ~SceneManagerEnumerator()

Ogre::SceneManagerEnumerator::~SceneManagerEnumerator ( )

Member Function Documentation

◆ addFactory()

void Ogre::SceneManagerEnumerator::addFactory ( SceneManagerFactory fact)

Register a new SceneManagerFactory.

Remarks
Plugins should call this to register as new SceneManager providers.

◆ removeFactory()

void Ogre::SceneManagerEnumerator::removeFactory ( SceneManagerFactory fact)

◆ getMetaData() [1/2]

const SceneManagerMetaData* Ogre::SceneManagerEnumerator::getMetaData ( const String typeName) const

Get more information about a given type of SceneManager.

Remarks
The metadata returned tells you a few things about a given type of SceneManager, which can be created using a factory that has been registered already.
Parameters
typeNameThe type name of the SceneManager you want to enquire on. If you don't know the typeName already, you can iterate over the metadata for all types using getMetaDataIterator.

◆ getMetaData() [2/2]

const MetaDataList& Ogre::SceneManagerEnumerator::getMetaData ( void  ) const
inline

get all types of SceneManager available for construction

providing some information about each one.

◆ getMetaDataIterator()

MetaDataIterator Ogre::SceneManagerEnumerator::getMetaDataIterator ( void  ) const

Iterate over all types of SceneManager available for construction, providing some information about each one.

Deprecated:
use getMetaData()

◆ createSceneManager() [1/2]

SceneManager* Ogre::SceneManagerEnumerator::createSceneManager ( const String typeName,
const String instanceName = BLANKSTRING 
)

Create a SceneManager instance of a given type.

Remarks
You can use this method to create a SceneManager instance of a given specific type. You may know this type already, or you may have discovered it by looking at the results from getMetaDataIterator.
Note
This method throws an exception if the named type is not found.
Parameters
typeNameString identifying a unique SceneManager type
instanceNameOptional name to given the new instance that is created. If you leave this blank, an auto name will be assigned.

◆ createSceneManager() [2/2]

SceneManager* Ogre::SceneManagerEnumerator::createSceneManager ( SceneTypeMask  typeMask,
const String instanceName = BLANKSTRING 
)
inline
Deprecated:
obsolete API - SceneTypeMask leads to arbitrary results

References Ogre::DefaultSceneManagerFactory::FACTORY_TYPE_NAME.

◆ destroySceneManager()

void Ogre::SceneManagerEnumerator::destroySceneManager ( SceneManager sm)

Destroy an instance of a SceneManager.

◆ getSceneManager()

SceneManager* Ogre::SceneManagerEnumerator::getSceneManager ( const String instanceName) const

Get an existing SceneManager instance that has already been created, identified by the instance name.

Parameters
instanceNameThe name of the instance to retrieve.

◆ hasSceneManager()

bool Ogre::SceneManagerEnumerator::hasSceneManager ( const String instanceName) const

Identify if a SceneManager instance already exists.

Parameters
instanceNameThe name of the instance to retrieve.

◆ getSceneManagerIterator()

SceneManagerIterator Ogre::SceneManagerEnumerator::getSceneManagerIterator ( void  )

Get an iterator over all the existing SceneManager instances.

Deprecated:
use getSceneManagers() instead

◆ getSceneManagers()

const Instances& Ogre::SceneManagerEnumerator::getSceneManagers ( ) const

Get all the existing SceneManager instances.

◆ setRenderSystem()

void Ogre::SceneManagerEnumerator::setRenderSystem ( RenderSystem rs)

Notifies all SceneManagers of the destination rendering system.

◆ shutdownAll()

void Ogre::SceneManagerEnumerator::shutdownAll ( void  )

Utility method to control shutdown of the managers.

◆ getSingleton()

static SceneManagerEnumerator& Ogre::SceneManagerEnumerator::getSingleton ( void  )
static

Get the singleton instance.

◆ getSingletonPtr()

static SceneManagerEnumerator* Ogre::SceneManagerEnumerator::getSingletonPtr ( void  )
static

Get the singleton instance.


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