OGRE  13.6
Object-Oriented Graphics Rendering Engine
Ogre::FrameTimeControllerValue Class Reference

Predefined controller value for getting the latest frame time. More...

#include <OgrePredefinedControllers.h>

+ Inheritance diagram for Ogre::FrameTimeControllerValue:

Public Member Functions

 FrameTimeControllerValue ()
bool frameStarted (const FrameEvent &evt) override
 Called when a frame is about to begin rendering. More...
Real getElapsedTime (void) const
Real getFrameDelay (void) const
Real getTimeFactor (void) const
Real getValue (void) const override
void setElapsedTime (Real elapsedTime)
void setFrameDelay (Real fd)
 Sets a constant frame rate. More...
void setTimeFactor (Real tf)
 Set the relative speed to update frame time based controllers. More...
void setValue (Real value) override
- Public Member Functions inherited from Ogre::ControllerValue< Real >
virtual ~ControllerValue ()
- Public Member Functions inherited from Ogre::FrameListener
virtual ~FrameListener ()
virtual bool frameEnded (const FrameEvent &evt)
 Called just after a frame has been rendered. More...
virtual bool frameRenderingQueued (const FrameEvent &evt)
 Called after all render targets have had their rendering commands issued, but before render windows have been asked to flip their buffers over. More...

Static Public Member Functions

static ControllerValueRealPtr create ()

Detailed Description

Predefined controller value for getting the latest frame time.

Constructor & Destructor Documentation

◆ FrameTimeControllerValue()

Ogre::FrameTimeControllerValue::FrameTimeControllerValue ( )

Member Function Documentation

◆ create()

static ControllerValueRealPtr Ogre::FrameTimeControllerValue::create ( )

◆ frameStarted()

bool Ogre::FrameTimeControllerValue::frameStarted ( const FrameEvent evt)

Called when a frame is about to begin rendering.

This event happens before any render targets have begun updating.

True to go ahead, false to abort rendering and drop out of the rendering loop.

Reimplemented from Ogre::FrameListener.

◆ getValue()

Real Ogre::FrameTimeControllerValue::getValue ( void  ) const

◆ setValue()

void Ogre::FrameTimeControllerValue::setValue ( Real  value)

◆ getTimeFactor()

Real Ogre::FrameTimeControllerValue::getTimeFactor ( void  ) const

◆ setTimeFactor()

void Ogre::FrameTimeControllerValue::setTimeFactor ( Real  tf)

Set the relative speed to update frame time based controllers.

Normally any controllers which use time as an input (FrameTimeController) are updated automatically in line with the real passage of time. This method allows you to change that, so that controllers are told that the time is passing slower or faster than it actually is. Use this to globally speed up / slow down the effect of time-based controllers.

tfThe virtual speed of time (1.0 is real time).

◆ getFrameDelay()

Real Ogre::FrameTimeControllerValue::getFrameDelay ( void  ) const

◆ setFrameDelay()

void Ogre::FrameTimeControllerValue::setFrameDelay ( Real  fd)

Sets a constant frame rate.

This function is useful when rendering a sequence to files that should create a film clip with constant frame rate. It will ensure that scrolling textures and animations move at a constant frame rate.

fdThe delay in seconds wanted between each frame (1.0f / 25.0f means a seconds worth of animation is done in 25 frames).

◆ getElapsedTime()

Real Ogre::FrameTimeControllerValue::getElapsedTime ( void  ) const

◆ setElapsedTime()

void Ogre::FrameTimeControllerValue::setElapsedTime ( Real  elapsedTime)

The documentation for this class was generated from the following file: