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

Ogre::SceneManagerEnumerator Class Reference

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

#include <OgreSceneManagerEnumerator.h>

Inheritance diagram for Ogre::SceneManagerEnumerator:

Ogre::Singleton< SceneManagerEnumerator > List of all members.

Public Member Functions

 SceneManagerEnumerator ()
 ~SceneManagerEnumerator ()
void setSceneManager (SceneType st, SceneManager *sm)
 Sets a SceneManager implementation.

SceneManagergetSceneManager (SceneType st)
 Implementation of SceneManager retrieval.

void setRenderSystem (RenderSystem *rs)
 Notifies all SceneManagers of the destination rendering system.

void shutdownAll (void)
 Utility method to control shutdown of the managers.


Static Public Member Functions

SceneManagerEnumeratorgetSingleton (void)
 Override standard Singleton retrieval.

SceneManagerEnumeratorgetSingletonPtr (void)
 Override standard Singleton retrieval.


Static Protected Attributes

SceneManagerEnumeratorms_Singleton

Private Types

typedef std::map< SceneType,
SceneManager * > 
SceneManagerList

Private Attributes

std::set< SceneManager * > mUniqueSceneMgrs
SceneManagerList mSceneManagers
SceneManagermDefaultManager
 Standard scene manager for default management.


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, the Root object has a getSceneManager method to retrieve a SceneManager which is appropriate to the scene type. However, this is the class which implements this behaviour and defines the scene types, because it is intended that the Root class is not customised by everybody (and it may be restricted access in the future).
If you customise Ogre and want to add a new SceneManager implementation (e.g. an Octree-based scene manager for outside locations), feel free to customise this class so that it is passed back where required.
For this early release of Ogre, only the basic SceneManager implementation is passed back for all scene types. This is a highly generic and extremely unoptimised reference implementation.

Definition at line 69 of file OgreSceneManagerEnumerator.h.


Member Typedef Documentation

typedef std::map<SceneType, SceneManager*> Ogre::SceneManagerEnumerator::SceneManagerList [private]
 

Definition at line 75 of file OgreSceneManagerEnumerator.h.


Constructor & Destructor Documentation

Ogre::SceneManagerEnumerator::SceneManagerEnumerator  ) 
 

Ogre::SceneManagerEnumerator::~SceneManagerEnumerator  ) 
 


Member Function Documentation

SceneManager* Ogre::SceneManagerEnumerator::getSceneManager SceneType  st  ) 
 

Implementation of SceneManager retrieval.

SceneManagerEnumerator& Ogre::SceneManagerEnumerator::getSingleton void   )  [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< SceneManagerEnumerator >.

SceneManagerEnumerator* Ogre::SceneManagerEnumerator::getSingletonPtr void   )  [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< SceneManagerEnumerator >.

void Ogre::SceneManagerEnumerator::setRenderSystem RenderSystem rs  ) 
 

Notifies all SceneManagers of the destination rendering system.

void Ogre::SceneManagerEnumerator::setSceneManager SceneType  st,
SceneManager sm
 

Sets a SceneManager implementation.

void Ogre::SceneManagerEnumerator::shutdownAll void   ) 
 

Utility method to control shutdown of the managers.


Member Data Documentation

SceneManager* Ogre::SceneManagerEnumerator::mDefaultManager [private]
 

Standard scene manager for default management.

Definition at line 79 of file OgreSceneManagerEnumerator.h.

SceneManagerEnumerator * Ogre::Singleton< SceneManagerEnumerator >::ms_Singleton [static, protected, inherited]
 

Definition at line 54 of file OgreSingleton.h.

SceneManagerList Ogre::SceneManagerEnumerator::mSceneManagers [private]
 

Definition at line 76 of file OgreSceneManagerEnumerator.h.

std::set<SceneManager*> Ogre::SceneManagerEnumerator::mUniqueSceneMgrs [private]
 

Definition at line 73 of file OgreSceneManagerEnumerator.h.


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

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:03:14 2006