OGRE  1.9.0
OgreLodStrategyManager.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2014 Torus Knot Software Ltd
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26-----------------------------------------------------------------------------
27*/
28#ifndef __Lod_Strategy_Manager_H__
29#define __Lod_Strategy_Manager_H__
30
31#include "OgrePrerequisites.h"
32
33#include "OgreLodStrategy.h"
34#include "OgreSingleton.h"
36#include "OgreHeaderPrefix.h"
37
38namespace Ogre {
39
47 class _OgreExport LodStrategyManager : public Singleton<LodStrategyManager>, public LodAlloc
48 {
51
54
57
58 public:
61
64
66 void addStrategy(LodStrategy *strategy);
67
74
81
84
87
89 void setDefaultStrategy(const String& name);
90
93
96
129 };
132}
133
134#include "OgreHeaderSuffix.h"
135
136#endif
#define _OgreExport
Definition: OgrePlatform.h:260
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Manager for LOD strategies.
~LodStrategyManager()
Destructor.
LodStrategy * removeStrategy(const String &name)
Remove a strategy from the manager with a specified name.
LodStrategy * getStrategy(const String &name)
Get the strategy with the specified name.
MapIterator< StrategyMap > getIterator()
Get an iterator for all contained strategies.
StrategyMap mStrategies
Internal map of strategies.
LodStrategyManager()
Default constructor.
static LodStrategyManager * getSingletonPtr(void)
Override standard Singleton retrieval.
LodStrategy * getDefaultStrategy()
Get the current default strategy.
void addStrategy(LodStrategy *strategy)
Add a strategy to the manager.
void setDefaultStrategy(LodStrategy *strategy)
Set the default strategy.
void setDefaultStrategy(const String &name)
Set the default strategy by name.
static LodStrategyManager & getSingleton(void)
Override standard Singleton retrieval.
LodStrategy * mDefaultStrategy
Default strategy.
map< String, LodStrategy * >::type StrategyMap
Map of strategies.
void removeAllStrategies()
Remove and delete all strategies from the manager.
Strategy for determining level of detail.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:65
_StringBase String
std::map< K, V, P, A > type