OGRE
1.8
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
OgrePredefinedControllers.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-2013 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 __PredefinedControllers_H__
29
#define __PredefinedControllers_H__
30
31
#include "
OgrePrerequisites.h
"
32
33
#include "
OgreCommon.h
"
34
#include "
OgreController.h
"
35
#include "
OgreFrameListener.h
"
36
#include "
OgreGpuProgram.h
"
37
38
namespace
Ogre {
39
46
//-----------------------------------------------------------------------
47
// Controller Values
48
//-----------------------------------------------------------------------
51
class
_OgreExport
FrameTimeControllerValue
:
public
ControllerValue
<Real>,
public
FrameListener
52
{
53
protected
:
54
Real
mFrameTime
;
55
Real
mTimeFactor
;
56
Real
mElapsedTime
;
57
Real
mFrameDelay
;
58
59
public
:
60
FrameTimeControllerValue
();
61
bool
frameEnded(
const
FrameEvent
&evt);
62
bool
frameStarted(
const
FrameEvent
&evt);
63
Real
getValue(
void
)
const
;
64
void
setValue(
Real
value);
65
Real
getTimeFactor(
void
)
const
;
66
void
setTimeFactor(
Real
tf);
67
Real
getFrameDelay(
void
)
const
;
68
void
setFrameDelay(
Real
fd);
69
Real
getElapsedTime(
void
)
const
;
70
void
setElapsedTime(
Real
elapsedTime);
71
};
72
73
//-----------------------------------------------------------------------
76
class
_OgreExport
TextureFrameControllerValue
:
public
ControllerValue
<Real>
77
{
78
protected
:
79
TextureUnitState
*
mTextureLayer
;
80
public
:
81
TextureFrameControllerValue
(
TextureUnitState
* t);
82
85
Real
getValue(
void
)
const
;
88
void
setValue(
Real
value);
89
90
};
91
//-----------------------------------------------------------------------
100
class
_OgreExport
TexCoordModifierControllerValue
:
public
ControllerValue
<Real>
101
{
102
protected
:
103
bool
mTransU,
mTransV
;
104
bool
mScaleU,
mScaleV
;
105
bool
mRotate
;
106
TextureUnitState
*
mTextureLayer
;
107
public
:
122
TexCoordModifierControllerValue
(
TextureUnitState
* t,
bool
translateU =
false
,
bool
translateV =
false
,
123
bool
scaleU =
false
,
bool
scaleV =
false
,
bool
rotate =
false
);
124
125
Real
getValue(
void
)
const
;
126
void
setValue(
Real
value);
127
128
};
129
130
//-----------------------------------------------------------------------
143
class
_OgreExport
FloatGpuParameterControllerValue
:
public
ControllerValue
<Real>
144
{
145
protected
:
147
GpuProgramParametersSharedPtr
mParams
;
149
size_t
mParamIndex
;
150
public
:
157
FloatGpuParameterControllerValue
(
GpuProgramParametersSharedPtr
params,
158
size_t
index );
159
160
~FloatGpuParameterControllerValue
() {}
161
162
Real
getValue(
void
)
const
;
163
void
setValue(
Real
value);
164
165
};
166
//-----------------------------------------------------------------------
167
// Controller functions
168
//-----------------------------------------------------------------------
169
173
class
_OgreExport
PassthroughControllerFunction
:
public
ControllerFunction
<Real>
174
{
175
public
:
182
PassthroughControllerFunction
(
bool
deltaInput =
false
);
183
186
Real
calculate(
Real
source);
187
};
188
191
class
_OgreExport
AnimationControllerFunction
:
public
ControllerFunction
<Real>
192
{
193
protected
:
194
Real
mSeqTime
;
195
Real
mTime
;
196
public
:
203
AnimationControllerFunction
(
Real
sequenceTime,
Real
timeOffset = 0.0f);
204
207
Real
calculate(
Real
source);
208
210
void
setTime(
Real
timeVal);
212
void
setSequenceTime(
Real
seqVal);
213
};
214
215
//-----------------------------------------------------------------------
218
class
_OgreExport
ScaleControllerFunction
:
public
ControllerFunction
<Real>
219
{
220
protected
:
221
Real
mScale
;
222
public
:
230
ScaleControllerFunction
(
Real
scalefactor,
bool
deltaInput);
231
234
Real
calculate(
Real
source);
235
236
};
237
238
//-----------------------------------------------------------------------
258
class
_OgreExport
WaveformControllerFunction
:
public
ControllerFunction
<Real>
259
{
260
protected
:
261
WaveformType
mWaveType
;
262
Real
mBase
;
263
Real
mFrequency
;
264
Real
mPhase
;
265
Real
mAmplitude
;
266
Real
mDutyCycle
;
267
269
Real
getAdjustedInput(
Real
input);
270
271
public
:
279
WaveformControllerFunction
(
WaveformType
wType,
Real
base = 0,
Real
frequency = 1,
Real
phase = 0,
Real
amplitude = 1,
bool
deltaInput =
true
,
Real
dutyCycle = 0.5);
280
283
Real
calculate(
Real
source);
284
285
};
286
//-----------------------------------------------------------------------
290
}
291
292
#endif
Ogre::WaveformControllerFunction::mAmplitude
Real mAmplitude
Definition:
OgrePredefinedControllers.h:265
Ogre::TexCoordModifierControllerValue::mTextureLayer
TextureUnitState * mTextureLayer
Definition:
OgrePredefinedControllers.h:106
Ogre::PassthroughControllerFunction
Predefined controller function which just passes through the original source directly to dest...
Definition:
OgrePredefinedControllers.h:173
Ogre::Real
float Real
Software floating point type.
Definition:
OgrePrerequisites.h:75
Ogre::FrameTimeControllerValue
Predefined controller value for getting the latest frame time.
Definition:
OgrePredefinedControllers.h:51
_OgreExport
#define _OgreExport
Definition:
OgrePlatform.h:233
Ogre::WaveformType
WaveformType
Enumerates the wave types usable with the Ogre engine.
Definition:
OgreCommon.h:164
Ogre::AnimationControllerFunction::mTime
Real mTime
Definition:
OgrePredefinedControllers.h:195
Ogre::TexCoordModifierControllerValue::mScaleV
bool mScaleV
Definition:
OgrePredefinedControllers.h:104
Ogre::FloatGpuParameterControllerValue::mParams
GpuProgramParametersSharedPtr mParams
The parameters to access.
Definition:
OgrePredefinedControllers.h:147
Ogre::FrameTimeControllerValue::mTimeFactor
Real mTimeFactor
Definition:
OgrePredefinedControllers.h:55
Ogre::WaveformControllerFunction::mFrequency
Real mFrequency
Definition:
OgrePredefinedControllers.h:263
Ogre::FloatGpuParameterControllerValue::mParamIndex
size_t mParamIndex
The index of the parameter to e read or set.
Definition:
OgrePredefinedControllers.h:149
Ogre::WaveformControllerFunction::mWaveType
WaveformType mWaveType
Definition:
OgrePredefinedControllers.h:261
OgreController.h
Ogre::WaveformControllerFunction
Predefined controller function based on a waveform.
Definition:
OgrePredefinedControllers.h:258
OgrePrerequisites.h
OgreCommon.h
Ogre::FloatGpuParameterControllerValue::~FloatGpuParameterControllerValue
~FloatGpuParameterControllerValue()
Definition:
OgrePredefinedControllers.h:160
Ogre::TexCoordModifierControllerValue
Predefined controller value for getting / setting a texture coordinate modifications (scales and tran...
Definition:
OgrePredefinedControllers.h:100
Ogre::FrameTimeControllerValue::mElapsedTime
Real mElapsedTime
Definition:
OgrePredefinedControllers.h:56
Ogre::TextureFrameControllerValue
Predefined controller value for getting / setting the frame number of a texture layer.
Definition:
OgrePredefinedControllers.h:76
Ogre::ControllerValue
Can either be used as an input or output value.
Definition:
OgreController.h:104
Ogre::ScaleControllerFunction::mScale
Real mScale
Definition:
OgrePredefinedControllers.h:221
Ogre::TexCoordModifierControllerValue::mRotate
bool mRotate
Definition:
OgrePredefinedControllers.h:105
OgreFrameListener.h
Ogre::FrameTimeControllerValue::mFrameTime
Real mFrameTime
Definition:
OgrePredefinedControllers.h:54
Ogre::FrameListener
A interface class defining a listener which can be used to receive notifications of frame events...
Definition:
OgreFrameListener.h:82
Ogre::AnimationControllerFunction
Predefined controller function for dealing with animation.
Definition:
OgrePredefinedControllers.h:191
Ogre::TextureFrameControllerValue::mTextureLayer
TextureUnitState * mTextureLayer
Definition:
OgrePredefinedControllers.h:79
Ogre::FrameTimeControllerValue::mFrameDelay
Real mFrameDelay
Definition:
OgrePredefinedControllers.h:57
Ogre::WaveformControllerFunction::mDutyCycle
Real mDutyCycle
Definition:
OgrePredefinedControllers.h:266
Ogre::TexCoordModifierControllerValue::mTransV
bool mTransV
Definition:
OgrePredefinedControllers.h:103
Ogre::ControllerFunction
Subclasses of this class are responsible for performing a function on an input value for a Controller...
Definition:
OgreController.h:55
Ogre::FloatGpuParameterControllerValue
Predefined controller value for setting a single floating- point value in a constant parameter of a v...
Definition:
OgrePredefinedControllers.h:143
Ogre::FrameEvent
Struct containing information about a frame event.
Definition:
OgreFrameListener.h:44
Ogre::SharedPtr< GpuProgramParameters >
Ogre::WaveformControllerFunction::mBase
Real mBase
Definition:
OgrePredefinedControllers.h:262
OgreGpuProgram.h
Ogre::WaveformControllerFunction::mPhase
Real mPhase
Definition:
OgrePredefinedControllers.h:264
Ogre::TextureUnitState
Class representing the state of a single texture unit during a Pass of a Technique, of a Material.
Definition:
OgreTextureUnitState.h:62
Ogre::ScaleControllerFunction
Predefined controller function which simply scales an input to an output value.
Definition:
OgrePredefinedControllers.h:218
Ogre::AnimationControllerFunction::mSeqTime
Real mSeqTime
Definition:
OgrePredefinedControllers.h:194
OgreMain
include
OgrePredefinedControllers.h
Generated on Fri Jun 20 2014 00:48:12 for OGRE by
1.8.7