Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound 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 Methods

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

SceneManagergetSceneManager (SceneType st)
 Implementation of SceneManager retrieval. More...

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


Static Public Methods

SceneManagerEnumerator & getSingleton (void)
 Override standard Singleton retrieval. More...

SceneManagerEnumerator * getSingletonPtr (void)

Static Protected Attributes

SceneManagerEnumerator * ms_Singleton = 0

Private Types

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

Private Attributes

std::set< SceneManager * > mUniqueSceneMgrs
SceneManagerList mSceneManagers
SceneManagermDefaultManager
 Standard scene manager for default management. 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, 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.


Member Typedef Documentation

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


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::Singleton< SceneManagerEnumerator >::getSingletonPtr void    [inline, static, inherited]
 

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.


Member Data Documentation

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

Standard scene manager for default management.

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

SceneManagerList Ogre::SceneManagerEnumerator::mSceneManagers [private]
 

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

Copyright © 2002 by The OGRE Team