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:

[legend]
List of all members.

## Public Methods

| SceneManagerEnumerator ()
| ~SceneManagerEnumerator ()
void | setSceneManager (SceneType st, SceneManager *sm)
| Sets a SceneManager implementation.
SceneManager * | getSceneManager (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 Methods

SceneManagerEnumerator & | getSingleton (void)
| Override standard Singleton retrieval.
SceneManagerEnumerator * | getSingletonPtr (void)
| Override standard Singleton retrieval.

## Static Protected Attributes

SceneManagerEnumerator * | ms_Singleton = 0

## Private Types

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

## Private Attributes

std::set< SceneManager * > | mUniqueSceneMgrs
SceneManagerList | mSceneManagers
SceneManager * | mDefaultManager
| 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 | ( |  | ) |

| Definition at line 50 of file OgreSceneManagerEnumerator.cpp. References mDefaultManager, setSceneManager(), Ogre::ST_EXTERIOR_CLOSE, Ogre::ST_EXTERIOR_FAR, Ogre::ST_EXTERIOR_REAL_FAR, Ogre::ST_GENERIC, and Ogre::ST_INTERIOR.

Ogre::SceneManagerEnumerator::~SceneManagerEnumerator | ( |  | ) |

| Definition at line 66 of file OgreSceneManagerEnumerator.cpp. References mDefaultManager.

## Member Function Documentation

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

| Implementation of SceneManager retrieval. Definition at line 71 of file OgreSceneManagerEnumerator.cpp. References Except, mSceneManagers, and Ogre::SceneType. Referenced by Ogre::Root::getSceneManager().

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 >.

Definition at line 44 of file OgreSceneManagerEnumerator.cpp.

References Ogre::Singleton< SceneManagerEnumerator >::ms_Singleton.

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 >.

Definition at line 40 of file OgreSceneManagerEnumerator.cpp.

References Ogre::Singleton< SceneManagerEnumerator >::ms_Singleton.

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

| Notifies all SceneManagers of the destination rendering system. Definition at line 88 of file OgreSceneManagerEnumerator.cpp. References mUniqueSceneMgrs.

void Ogre::SceneManagerEnumerator::setSceneManager | ( | SceneType | st,
|  | SceneManager * | sm
| ) |

| Sets a SceneManager implementation. Definition at line 100 of file OgreSceneManagerEnumerator.cpp. References Ogre::SceneManager::_setDestinationRenderSystem(), mSceneManagers, mUniqueSceneMgrs, and Ogre::SceneType. Referenced by SceneManagerEnumerator().

void Ogre::SceneManagerEnumerator::shutdownAll | ( | void |  | ) |

| Utility method to control shutdown of the managers. Definition at line 126 of file OgreSceneManagerEnumerator.cpp. References mUniqueSceneMgrs.

## Member Data Documentation

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

| Standard scene manager for default management. Definition at line 79 of file OgreSceneManagerEnumerator.h. Referenced by SceneManagerEnumerator(), and ~SceneManagerEnumerator().

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

| Definition at line 39 of file OgreSceneManagerEnumerator.cpp. Referenced by getSingleton(), and getSingletonPtr().

SceneManagerList Ogre::SceneManagerEnumerator::mSceneManagers`[private]`

| Definition at line 76 of file OgreSceneManagerEnumerator.h. Referenced by getSceneManager(), and setSceneManager().

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

| Definition at line 73 of file OgreSceneManagerEnumerator.h. Referenced by setRenderSystem(), setSceneManager(), and shutdownAll().

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

- OgreSceneManagerEnumerator.h
- OgreSceneManagerEnumerator.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:35 2004