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.
set< Controller< Real > * >::type ControllerList
Controller< Real > * createTextureRotater(TextureUnitState *layer, Real speed)
Creates a basic time-based texture coordinate modifier designed for creating rotating textures.
const ControllerFunctionRealPtr & getPassthroughControllerFunction(void) const
Retrieve a simple passthrough controller function.
ControllerValueRealPtr mFrameTimeController
Global predefined controller.
Controller< Real > * createTextureUVScroller(TextureUnitState *layer, Real speed)
Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.
unsigned long mLastFrameNumber
Last frame number updated.
static ControllerManager & getSingleton(void)
Override standard Singleton retrieval.
Real getFrameDelay(void) const
Gets the constant that is added to time lapsed between each frame.
Real getElapsedTime(void) const
Return the elapsed time.
void destroyController(Controller< Real > *controller)
Removes & destroys the controller passed in as a pointer.
Controller< Real > * createController(const ControllerValueRealPtr &src, const ControllerValueRealPtr &dest, const ControllerFunctionRealPtr &func)
Creates a new controller and registers it with the manager.
void setFrameDelay(Real fd)
Sets a constant frame rate.
Controller< Real > * createTextureVScroller(TextureUnitState *layer, Real vSpeed)
Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.
void setTimeFactor(Real tf)
Set the relative speed to update frame time based controllers.
Controller< Real > * createTextureAnimator(TextureUnitState *layer, Real sequenceTime)
Creates a texture layer animator controller.
const ControllerValueRealPtr & getFrameTimeSource(void) const
Returns a ControllerValue which provides the time since the last frame as a control value source.
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.
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.
ControllerFunctionRealPtr mPassthroughFunction
Global predefined controller.
void setElapsedTime(Real elapsedTime)
Set the elapsed time.
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.
Controller< Real > * createTextureUScroller(TextureUnitState *layer, Real uSpeed)
Creates a basic time-based texture u coordinate modifier designed for creating scrolling textures.
static ControllerManager * getSingletonPtr(void)
Override standard Singleton retrieval.
Real getTimeFactor(void) const
Return relative speed of time as perceived by time based controllers.
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.