Class for managing Controller instances. More...
#include <OgreControllerManager.h>
Public Member Functions | |
ControllerManager () | |
~ControllerManager () | |
Controller< Real > * | createController (const ControllerValueRealPtr &src, const ControllerValueRealPtr &dest, const ControllerFunctionRealPtr &func) |
Creates a new controller and registers it with the manager. | |
Controller< Real > * | createFrameTimePassthroughController (const ControllerValueRealPtr &dest) |
Creates a new controller use frame time source and passthrough controller function. | |
void | clearControllers (void) |
Destroys all the controllers in existence. | |
void | updateAllControllers (void) |
Updates all the registered controllers. | |
const ControllerValueRealPtr & | getFrameTimeSource (void) const |
Returns a ControllerValue which provides the time since the last frame as a control value source. | |
const ControllerFunctionRealPtr & | getPassthroughControllerFunction (void) const |
Retrieve a simple passthrough controller function. | |
Controller< Real > * | createTextureAnimator (TextureUnitState *layer, Real sequenceTime) |
Creates a texture layer animator controller. | |
Controller< Real > * | createTextureUVScroller (TextureUnitState *layer, Real speed) |
Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures. | |
Controller< Real > * | createTextureUScroller (TextureUnitState *layer, Real uSpeed) |
Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures. | |
Controller< Real > * | createTextureVScroller (TextureUnitState *layer, Real vSpeed) |
Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures. | |
Controller< Real > * | createTextureRotater (TextureUnitState *layer, Real speed) |
Creates a basic time-based texture coordinate modifier designed for creating rotating textures. | |
Controller< Real > * | createTextureWaveTransformer (TextureUnitState *layer, TextureUnitState::TextureTransformType ttype, WaveformType waveType, Real base=0, Real frequency=1, Real phase=0, Real amplitude=1) |
Creates a very flexible time-based texture transformation which can alter the scale, position or rotation of a texture based on a wave function. | |
Controller< Real > * | createGpuProgramTimerParam (GpuProgramParametersSharedPtr params, size_t paramIndex, Real timeFactor=1.0f) |
Creates a controller for passing a frame time value through to a vertex / fragment program parameter. | |
void | destroyController (Controller< Real > *controller) |
Removes & destroys the controller passed in as a pointer. | |
Real | getTimeFactor (void) const |
Return relative speed of time as perceived by time based controllers. | |
void | setTimeFactor (Real tf) |
Set the relative speed to update frame time based controllers. | |
Real | getFrameDelay (void) const |
Gets the constant that is added to time lapsed between each frame. | |
void | setFrameDelay (Real fd) |
Sets a constant frame rate. | |
Real | getElapsedTime (void) const |
Return the elapsed time. | |
void | setElapsedTime (Real elapsedTime) |
Set the elapsed time. | |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz) |
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 *) |
Static Public Member Functions | |
static ControllerManager & | getSingleton (void) |
Override standard Singleton retrieval. | |
static ControllerManager * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
Protected Types | |
typedef set< Controller< Real > * >::type | ControllerList |
Protected Attributes | |
ControllerList | mControllers |
ControllerValueRealPtr | mFrameTimeController |
Global predefined controller. | |
ControllerFunctionRealPtr | mPassthroughFunction |
Global predefined controller. | |
unsigned long | mLastFrameNumber |
Static Protected Attributes | |
static ControllerManager * | msSingleton |
Class for managing Controller instances.
Definition at line 57 of file OgreControllerManager.h.
typedef set<Controller<Real>*>::type Ogre::ControllerManager::ControllerList [protected] |
Definition at line 60 of file OgreControllerManager.h.
Ogre::ControllerManager::ControllerManager | ( | ) |
Ogre::ControllerManager::~ControllerManager | ( | ) |
void Ogre::ControllerManager::clearControllers | ( | void | ) |
Destroys all the controllers in existence.
Controller<Real>* Ogre::ControllerManager::createController | ( | const ControllerValueRealPtr & | src, | |
const ControllerValueRealPtr & | dest, | |||
const ControllerFunctionRealPtr & | func | |||
) |
Creates a new controller and registers it with the manager.
Controller<Real>* Ogre::ControllerManager::createFrameTimePassthroughController | ( | const ControllerValueRealPtr & | dest | ) |
Creates a new controller use frame time source and passthrough controller function.
Controller<Real>* Ogre::ControllerManager::createGpuProgramTimerParam | ( | GpuProgramParametersSharedPtr | params, | |
size_t | paramIndex, | |||
Real | timeFactor = 1.0f | |||
) |
Creates a controller for passing a frame time value through to a vertex / fragment program parameter.
params | The parameters to update | |
paramIndex | The index of the parameter to update; if you want a named parameter, then retrieve the index beforehand using GpuProgramParameters::getParamIndex | |
factor | The factor by which to adjust the time elapsed by before passing it to the program |
Controller<Real>* Ogre::ControllerManager::createTextureAnimator | ( | TextureUnitState * | layer, | |
Real | sequenceTime | |||
) |
Creates a texture layer animator controller.
layer | TextureUnitState object to animate | |
sequenceTime | The amount of time in seconds it will take to loop through all the frames. |
Controller<Real>* Ogre::ControllerManager::createTextureRotater | ( | TextureUnitState * | layer, | |
Real | speed | |||
) |
Creates a basic time-based texture coordinate modifier designed for creating rotating textures.
layer | The texture layer to rotate. | |
vSpeed | Speed of rotation, in complete anticlockwise revolutions per second |
Controller<Real>* Ogre::ControllerManager::createTextureUScroller | ( | TextureUnitState * | layer, | |
Real | uSpeed | |||
) |
Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.
layer | The texture layer to animate. | |
uSpeed | Speed of horizontal (u-coord) scroll, in complete wraps per second |
Controller<Real>* Ogre::ControllerManager::createTextureUVScroller | ( | TextureUnitState * | layer, | |
Real | speed | |||
) |
Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.
layer | The texture layer to animate. | |
speed | Speed of horizontal (u-coord) and vertical (v-coord) scroll, in complete wraps per second |
Controller<Real>* Ogre::ControllerManager::createTextureVScroller | ( | TextureUnitState * | layer, | |
Real | vSpeed | |||
) |
Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.
layer | The texture layer to animate. | |
vSpeed | Speed of vertical (v-coord) scroll, in complete wraps per second |
Controller<Real>* Ogre::ControllerManager::createTextureWaveTransformer | ( | TextureUnitState * | layer, | |
TextureUnitState::TextureTransformType | ttype, | |||
WaveformType | waveType, | |||
Real | base = 0 , |
|||
Real | frequency = 1 , |
|||
Real | phase = 0 , |
|||
Real | amplitude = 1 | |||
) |
Creates a very flexible time-based texture transformation which can alter the scale, position or rotation of a texture based on a wave function.
layer | The texture layer to affect | |
ttype | The type of transform, either translate (scroll), scale (stretch) or rotate (spin) | |
waveType | The shape of the wave, see WaveformType enum for details | |
base | The base value of the output | |
frequency | The speed of the wave in cycles per second | |
phase | The offset of the start of the wave, e.g. 0.5 to start half-way through the wave | |
amplitude | Scales the output so that instead of lying within 0..1 it lies within 0..1*amplitude for exaggerated effects |
void Ogre::ControllerManager::destroyController | ( | Controller< Real > * | controller | ) |
Removes & destroys the controller passed in as a pointer.
Real Ogre::ControllerManager::getElapsedTime | ( | void | ) | const |
Return the elapsed time.
Real Ogre::ControllerManager::getFrameDelay | ( | void | ) | const |
Gets the constant that is added to time lapsed between each frame.
const ControllerValueRealPtr& Ogre::ControllerManager::getFrameTimeSource | ( | void | ) | const |
Returns a ControllerValue which provides the time since the last frame as a control value source.
const ControllerFunctionRealPtr& Ogre::ControllerManager::getPassthroughControllerFunction | ( | void | ) | const |
Retrieve a simple passthrough controller function.
static ControllerManager& Ogre::ControllerManager::getSingleton | ( | void | ) | [static] |
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< ControllerManager >.
static ControllerManager* Ogre::ControllerManager::getSingletonPtr | ( | void | ) | [static] |
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< ControllerManager >.
Real Ogre::ControllerManager::getTimeFactor | ( | void | ) | const |
Return relative speed of time as perceived by time based controllers.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
void Ogre::ControllerManager::setElapsedTime | ( | Real | elapsedTime | ) |
Set the elapsed time.
elapsedTime | The new elapsed time |
void Ogre::ControllerManager::setFrameDelay | ( | Real | fd | ) |
Sets a constant frame rate.
fd | The delay in seconds wanted between each frame (1.0f / 25.0f means a seconds worth of animation is done in 25 frames). |
void Ogre::ControllerManager::setTimeFactor | ( | Real | tf | ) |
Set the relative speed to update frame time based controllers.
tf | The virtual speed of time (1.0 is real time). |
void Ogre::ControllerManager::updateAllControllers | ( | void | ) |
Updates all the registered controllers.
ControllerList Ogre::ControllerManager::mControllers [protected] |
Definition at line 61 of file OgreControllerManager.h.
Global predefined controller.
Definition at line 64 of file OgreControllerManager.h.
unsigned long Ogre::ControllerManager::mLastFrameNumber [protected] |
Definition at line 70 of file OgreControllerManager.h.
Global predefined controller.
Definition at line 67 of file OgreControllerManager.h.
ControllerManager * Ogre::Singleton< ControllerManager >::msSingleton [static, protected, inherited] |
Definition at line 75 of file OgreSingleton.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:37:18 2012