OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::SceneManagerEnumerator Class Reference

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

#include <OgreSceneManagerEnumerator.h>

+ Inheritance diagram for Ogre::SceneManagerEnumerator:

Public Types

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

Public Member Functions

 SceneManagerEnumerator ()
 
 ~SceneManagerEnumerator ()
 
void addFactory (SceneManagerFactory *fact)
 Register a new SceneManagerFactory.
 
SceneManagercreateSceneManager (const String &typeName, size_t numWorkerThreads, InstancingThreadedCullingMethod threadedCullingMethod, const String &instanceName=BLANKSTRING)
 Create a SceneManager instance of a given type.
 
SceneManagercreateSceneManager (SceneTypeMask typeMask, size_t numWorkerThreads, InstancingThreadedCullingMethod threadedCullingMethod, const String &instanceName=BLANKSTRING)
 Create a SceneManager instance based on scene type support.
 
void destroySceneManager (SceneManager *sm)
 Destroy an instance of a SceneManager.
 
const SceneManagerMetaDatagetMetaData (const String &typeName) const
 Get more information about a given type of SceneManager.
 
MetaDataIterator getMetaDataIterator (void) const
 Iterate over all types of SceneManager available for construction, providing some information about each one.
 
SceneManagergetSceneManager (const String &instanceName) const
 Get an existing SceneManager instance that has already been created, identified by the instance name.
 
SceneManagerIterator getSceneManagerIterator (void)
 Get an iterator over all the existing SceneManager instances.
 
bool hasSceneManager (const String &instanceName) const
 Identify if a SceneManager instance already exists.
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
void removeFactory (SceneManagerFactory *fact)
 Remove a SceneManagerFactory.
 
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

static SceneManagerEnumeratorgetSingleton (void)
 Override standard Singleton retrieval.
 
static SceneManagerEnumeratorgetSingletonPtr (void)
 Override standard Singleton retrieval.
 

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.

◆ MetaDataIterator

◆ MetaDataList

List of available scene manager types as meta data.

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

◆ createSceneManager() [1/2]

SceneManager * Ogre::SceneManagerEnumerator::createSceneManager ( const String typeName,
size_t  numWorkerThreads,
InstancingThreadedCullingMethod  threadedCullingMethod,
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,
size_t  numWorkerThreads,
InstancingThreadedCullingMethod  threadedCullingMethod,
const String instanceName = BLANKSTRING 
)

Create a SceneManager instance based on scene type support.

Remarks
Creates an instance of a SceneManager which supports the scene types identified in the parameter. If more than one type of SceneManager has been registered as handling that combination of scene types, in instance of the last one registered is returned.
Note
This method always succeeds, if a specific scene manager is not found, the default implementation is always returned.
Parameters
typeMaskA mask containing one or more SceneType flags
instanceNameOptional name to given the new instance that is created. If you leave this blank, an auto name will be assigned.

◆ destroySceneManager()

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

Destroy an instance of a SceneManager.

◆ getMetaData()

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.

◆ getMetaDataIterator()

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

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

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

◆ getSceneManagerIterator()

SceneManagerIterator Ogre::SceneManagerEnumerator::getSceneManagerIterator ( void  )

Get an iterator over all the existing SceneManager instances.

◆ getSingleton()

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

◆ getSingletonPtr()

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

◆ hasSceneManager()

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

Identify if a SceneManager instance already exists.

Parameters
instanceNameThe name of the instance to retrieve.

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

array operator new, with debug line info

◆ removeFactory()

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

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


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