OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::LodStrategyManager Class Reference

Manager for LOD strategies. More...

#include <OgreLodStrategyManager.h>

+ Inheritance diagram for Ogre::LodStrategyManager:
+ Collaboration diagram for Ogre::LodStrategyManager:

Public Member Functions

 LodStrategyManager ()
 Default constructor. More...
 
 ~LodStrategyManager ()
 Destructor. More...
 
void addStrategy (LodStrategy *strategy)
 Add a strategy to the manager. More...
 
LodStrategygetDefaultStrategy ()
 Get the current default strategy. More...
 
MapIterator< StrategyMapgetIterator ()
 Get an iterator for all contained strategies. More...
 
LodStrategygetStrategy (const String &name)
 Get the strategy with the specified name. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
void removeAllStrategies ()
 Remove and delete all strategies from the manager. More...
 
LodStrategyremoveStrategy (const String &name)
 Remove a strategy from the manager with a specified name. More...
 
void setDefaultStrategy (LodStrategy *strategy)
 Set the default strategy. More...
 
void setDefaultStrategy (const String &name)
 Set the default strategy by name. More...
 

Static Public Member Functions

static LodStrategyManagergetSingleton (void)
 Override standard Singleton retrieval. More...
 
static LodStrategyManagergetSingletonPtr (void)
 Override standard Singleton retrieval. More...
 

Static Protected Attributes

static LodStrategyManagermsSingleton
 

Private Types

typedef map< String,
LodStrategy * >::type 
StrategyMap
 Map of strategies. More...
 

Private Attributes

LodStrategymDefaultStrategy
 Default strategy. More...
 
StrategyMap mStrategies
 Internal map of strategies. More...
 

Detailed Description

Manager for LOD strategies.

Definition at line 47 of file OgreLodStrategyManager.h.

Member Typedef Documentation

Map of strategies.

Definition at line 50 of file OgreLodStrategyManager.h.

Constructor & Destructor Documentation

Ogre::LodStrategyManager::LodStrategyManager ( )

Default constructor.

Ogre::LodStrategyManager::~LodStrategyManager ( )

Destructor.

Member Function Documentation

void Ogre::LodStrategyManager::addStrategy ( LodStrategy strategy)

Add a strategy to the manager.

LodStrategy* Ogre::LodStrategyManager::getDefaultStrategy ( )

Get the current default strategy.

MapIterator<StrategyMap> Ogre::LodStrategyManager::getIterator ( )

Get an iterator for all contained strategies.

static LodStrategyManager& Ogre::LodStrategyManager::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.
static LodStrategyManager* Ogre::LodStrategyManager::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.
LodStrategy* Ogre::LodStrategyManager::getStrategy ( const String name)

Get the strategy with the specified name.

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

Definition at line 96 of file OgreMemoryAllocatedObject.h.

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

Definition at line 102 of file OgreMemoryAllocatedObject.h.

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

Definition at line 108 of file OgreMemoryAllocatedObject.h.

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

Definition at line 113 of file OgreMemoryAllocatedObject.h.

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

Definition at line 119 of file OgreMemoryAllocatedObject.h.

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

Definition at line 68 of file OgreMemoryAllocatedObject.h.

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

Definition at line 73 of file OgreMemoryAllocatedObject.h.

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

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

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

Definition at line 86 of file OgreMemoryAllocatedObject.h.

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

Definition at line 91 of file OgreMemoryAllocatedObject.h.

void Ogre::LodStrategyManager::removeAllStrategies ( )

Remove and delete all strategies from the manager.

Remarks
All strategies are deleted. If finer control is required over strategy destruction, use removeStrategy.
LodStrategy* Ogre::LodStrategyManager::removeStrategy ( const String name)

Remove a strategy from the manager with a specified name.

Remarks
The removed strategy is returned so the user can control how it is destroyed.
void Ogre::LodStrategyManager::setDefaultStrategy ( LodStrategy strategy)

Set the default strategy.

void Ogre::LodStrategyManager::setDefaultStrategy ( const String name)

Set the default strategy by name.

Member Data Documentation

LodStrategy* Ogre::LodStrategyManager::mDefaultStrategy
private

Default strategy.

Definition at line 56 of file OgreLodStrategyManager.h.

LodStrategyManager * Ogre::Singleton< LodStrategyManager >::msSingleton
staticprotectedinherited

Definition at line 75 of file OgreSingleton.h.

StrategyMap Ogre::LodStrategyManager::mStrategies
private

Internal map of strategies.

Definition at line 53 of file OgreLodStrategyManager.h.


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