28#ifndef __ControllerManager_H__
29#define __ControllerManager_H__
204 Real timeFactor = 1.0f);
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Class for managing Controller instances.
const ControllerFunctionRealPtr & getPassthroughControllerFunction(void) const
Retrieve a simple passthrough controller function.
Controller< Real > * createTextureUVScroller(TextureUnitState *layer, Real speed)
Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.
const ControllerValueRealPtr & getFrameTimeSource(void) const
Returns a ControllerValue which provides the time since the last frame as a control value source.
ControllerValueRealPtr mFrameTimeController
Global predefined controller.
unsigned long mLastFrameNumber
Last frame number updated.
Controller< Real > * createController(const ControllerValueRealPtr &src, const ControllerValueRealPtr &dest, const ControllerFunctionRealPtr &func)
Creates a new controller and registers it with the manager.
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.
Controller< Real > * createTextureRotater(TextureUnitState *layer, Real speed)
Creates a basic time-based texture coordinate modifier designed for creating rotating textures.
set< Controller< Real > * >::type ControllerList
Controller< Real > * createTextureVScroller(TextureUnitState *layer, Real vSpeed)
Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.
Real getFrameDelay(void) const
Gets the constant that is added to time lapsed between each frame.
Controller< Real > * createFrameTimePassthroughController(const ControllerValueRealPtr &dest)
Creates a new controller use frame time source and passthrough controller function.
Real getElapsedTime(void) const
Return the elapsed time.
void destroyController(Controller< Real > *controller)
Removes & destroys the controller passed in as a pointer.
Controller< Real > * createTextureUScroller(TextureUnitState *layer, Real uSpeed)
Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.
void setFrameDelay(Real fd)
Sets a constant frame rate.
static ControllerManager & getSingleton(void)
Override standard Singleton retrieval.
void setTimeFactor(Real tf)
Set the relative speed to update frame time based controllers.
ControllerList mControllers
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,...
void updateAllControllers(void)
Updates all the registered controllers.
static ControllerManager * getSingletonPtr(void)
Override standard Singleton retrieval.
ControllerFunctionRealPtr mPassthroughFunction
Global predefined controller.
Controller< Real > * createTextureAnimator(TextureUnitState *layer, Real sequenceTime)
Creates a texture layer animator controller.
void setElapsedTime(Real elapsedTime)
Set the elapsed time.
void clearControllers(void)
Destroys all the controllers in existence.
Real getTimeFactor(void) const
Return relative speed of time as perceived by time based controllers.
Instances of this class 'control' the value of another object in the system.
Reference-counted shared pointer, used for objects where implicit destruction is required.
Template class for creating single-instance global classes.
Class representing the state of a single texture unit during a Pass of a Technique,...
TextureTransformType
Useful enumeration when dealing with procedural transforms.
SharedPtr< ControllerValue< Real > > ControllerValueRealPtr
WaveformType
Enumerates the wave types usable with the Ogre engine.
SharedPtr< ControllerFunction< Real > > ControllerFunctionRealPtr
float Real
Software floating point type.