OGRE
1.9
Object-Oriented Graphics Rendering Engine
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
OgreControllerManager.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of OGRE
4
(Object-oriented Graphics Rendering Engine)
5
For the latest info, see http://www.ogre3d.org/
6
7
Copyright (c) 2000-2014 Torus Knot Software Ltd
8
9
Permission is hereby granted, free of charge, to any person obtaining a copy
10
of this software and associated documentation files (the "Software"), to deal
11
in the Software without restriction, including without limitation the rights
12
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
copies of the Software, and to permit persons to whom the Software is
14
furnished to do so, subject to the following conditions:
15
16
The above copyright notice and this permission notice shall be included in
17
all copies or substantial portions of the Software.
18
19
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
THE SOFTWARE.
26
-----------------------------------------------------------------------------
27
*/
28
#ifndef __ControllerManager_H__
29
#define __ControllerManager_H__
30
31
#include "
OgrePrerequisites.h
"
32
33
#include "
OgreCommon.h
"
34
#include "
OgreSingleton.h
"
35
#include "
OgreController.h
"
36
#include "
OgrePredefinedControllers.h
"
37
#include "
OgreTextureUnitState.h
"
38
#include "
OgreSharedPtr.h
"
39
#include "
OgreHeaderPrefix.h
"
40
41
namespace
Ogre {
49
typedef
SharedPtr< ControllerValue<Real>
>
ControllerValueRealPtr
;
50
typedef
SharedPtr< ControllerFunction<Real>
>
ControllerFunctionRealPtr
;
51
58
class
_OgreExport
ControllerManager
:
public
Singleton
<ControllerManager>,
public
ControllerAlloc
59
{
60
protected
:
61
typedef
set<Controller<Real>
*>::type
ControllerList
;
62
ControllerList
mControllers
;
63
65
ControllerValueRealPtr
mFrameTimeController
;
66
68
ControllerFunctionRealPtr
mPassthroughFunction
;
69
71
unsigned
long
mLastFrameNumber
;
72
73
public
:
74
ControllerManager
();
75
~
ControllerManager
();
76
79
Controller<Real>
* createController(
const
ControllerValueRealPtr
& src,
80
const
ControllerValueRealPtr
& dest,
const
ControllerFunctionRealPtr
& func);
81
84
Controller<Real>
* createFrameTimePassthroughController(
85
const
ControllerValueRealPtr
& dest);
86
89
void
clearControllers(
void
);
90
93
void
updateAllControllers(
void
);
94
95
105
const
ControllerValueRealPtr
& getFrameTimeSource(
void
)
const
;
106
108
const
ControllerFunctionRealPtr
& getPassthroughControllerFunction(
void
)
const
;
109
119
Controller<Real>
* createTextureAnimator(
TextureUnitState
* layer,
Real
sequenceTime);
120
133
Controller<Real>
* createTextureUVScroller(
TextureUnitState
* layer,
Real
speed);
134
145
Controller<Real>
* createTextureUScroller(
TextureUnitState
* layer,
Real
uSpeed);
146
157
Controller<Real>
* createTextureVScroller(
TextureUnitState
* layer,
Real
vSpeed);
158
169
Controller<Real>
* createTextureRotater(
TextureUnitState
* layer,
Real
speed);
170
188
Controller<Real>
* createTextureWaveTransformer(
TextureUnitState
* layer,
TextureUnitState::TextureTransformType
ttype,
189
WaveformType
waveType,
Real
base = 0,
Real
frequency = 1,
Real
phase = 0,
Real
amplitude = 1);
190
203
Controller<Real>
* createGpuProgramTimerParam(
GpuProgramParametersSharedPtr
params,
size_t
paramIndex,
204
Real
timeFactor = 1.0f);
205
208
void
destroyController(
Controller<Real>
* controller);
209
214
Real
getTimeFactor(
void
)
const
;
215
225
void
setTimeFactor(
Real
tf);
226
231
Real
getFrameDelay(
void
)
const
;
232
245
void
setFrameDelay(
Real
fd);
246
251
Real
getElapsedTime(
void
)
const
;
252
261
void
setElapsedTime(
Real
elapsedTime);
262
278
static
ControllerManager
& getSingleton(
void
);
294
static
ControllerManager
* getSingletonPtr(
void
);
295
};
296
300
}
// namespace Ogre
301
302
#include "
OgreHeaderSuffix.h
"
303
304
#endif // __ControllerManager_H__
OgrePredefinedControllers.h
Ogre::Real
float Real
Software floating point type.
Definition:
OgrePrerequisites.h:70
_OgreExport
#define _OgreExport
Definition:
OgrePlatform.h:260
OgreSingleton.h
Ogre::ControllerManager::mPassthroughFunction
ControllerFunctionRealPtr mPassthroughFunction
Global predefined controller.
Definition:
OgreControllerManager.h:68
Ogre::ControllerManager::mFrameTimeController
ControllerValueRealPtr mFrameTimeController
Global predefined controller.
Definition:
OgreControllerManager.h:65
OgreHeaderSuffix.h
Ogre::WaveformType
WaveformType
Enumerates the wave types usable with the Ogre engine.
Definition:
OgreCommon.h:161
Ogre::Singleton
Template class for creating single-instance global classes.
Definition:
OgreSingleton.h:64
Ogre::ControllerValueRealPtr
SharedPtr< ControllerValue< Real > > ControllerValueRealPtr
Definition:
OgreControllerManager.h:49
OgreController.h
OgrePrerequisites.h
OgreCommon.h
Ogre::ControllerManager::ControllerList
set< Controller< Real > * >::type ControllerList
Definition:
OgreControllerManager.h:61
Ogre::Controller< Real >
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition:
OgreMemoryAllocatedObject.h:58
OgreHeaderPrefix.h
Ogre::set
Definition:
OgrePrerequisites.h:522
Ogre::ControllerManager::mLastFrameNumber
unsigned long mLastFrameNumber
Last frame number updated.
Definition:
OgreControllerManager.h:71
Ogre::ControllerFunctionRealPtr
SharedPtr< ControllerFunction< Real > > ControllerFunctionRealPtr
Definition:
OgreControllerManager.h:50
Ogre::ControllerManager::mControllers
ControllerList mControllers
Definition:
OgreControllerManager.h:62
Ogre::TextureUnitState::TextureTransformType
TextureTransformType
Useful enumeration when dealing with procedural transforms.
Definition:
OgreTextureUnitState.h:112
Ogre::SharedPtr
Reference-counted shared pointer, used for objects where implicit destruction is required.
Definition:
OgrePrerequisites.h:313
OgreTextureUnitState.h
Ogre::TextureUnitState
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
Definition:
OgreTextureUnitState.h:62
OgreSharedPtr.h
Ogre::ControllerManager
Class for managing Controller instances.
Definition:
OgreControllerManager.h:58
OgreMain
include
OgreControllerManager.h
Generated on Fri Jun 20 2014 00:37:31 for OGRE by
1.8.7