|
My Project
|
the class for all frame rate controller. More...
#include <FrameRateController.h>
Public Types | |
| enum | ControllerType { FRC_NONE = 0, FRC_CONSTANT, FRC_CONSTANT_OR_ABOVE, FRC_FIRSTORDER, FRC_SECONDORDER, FRC_BELOW, FRC_CONSTANT_OR_BELOW } |
Public Member Functions | |
| CFrameRateController (ControllerType type) | |
| last elapsed time, since framemove() | |
| double | GetTime () |
| get the time in seconds | |
| void | SetType (ControllerType nType) |
| get the elapsed time: this function is disabled for a reason. More... | |
| void | SetConstDeltaTime (double fConstDeltaTime) |
| set const delta time. More... | |
| double | FrameMove (double time) |
| frame move by an absolute current time More... | |
| double | FrameMoveDelta (double deltatime) |
| frame move by a delta time More... | |
Static Public Member Functions | |
| static void | LoadFRCNormal (float fIdealInterval=-1.f) |
| load the normal frame rate control configuration | |
| static void | LoadFRCRealtime (float fIdealInterval=-1.f) |
| Real time frame rate control. | |
| static void | LoadFRCCapture (int nFPS) |
| static void | LoadFRCServerMode () |
Public Attributes | |
| ControllerType | m_nType |
| float | m_fConstDeltaTime |
| Frame Rate Controller Type. | |
| float | m_fMaxDeltaTime |
| the Ideal delta Time rate | |
| float | m_fMinDeltaTime |
| the largest delta Time we could tolerate | |
| float | m_fLinearSlope |
| the smallest delta Time we allow, some module need frame rate to be under a certain value | |
| float | m_fMaxLinearDeltaTime |
| Slope for linear interpolation.d(dT)/d(n) | |
| double | m_fNextTime |
| the largest delta Time we could tolerate at linear interpolation mode | |
| double | m_fTime |
| the next ideal time to be called. | |
| double | m_fLastTime |
| current time | |
| double | m_fElapsedTime |
| last time, when framemove() is called | |
| double | m_fLastElapsedTime |
| current elapsed time | |
the class for all frame rate controller.
The class is used to generate smooth frame rate call FrameMove() or FrameMoveDelta() at every frame move
| double ParaEngine::CFrameRateController::FrameMove | ( | double | time | ) |
frame move by an absolute current time
call this function to advance using absolute time, return the desired elapsed time
| double ParaEngine::CFrameRateController::FrameMoveDelta | ( | double | deltatime | ) |
frame move by a delta time
call this function to advance using delta time return the desired elapsed time
| void ParaEngine::CFrameRateController::SetConstDeltaTime | ( | double | fConstDeltaTime | ) |
set const delta time.
| void ParaEngine::CFrameRateController::SetType | ( | ControllerType | nType | ) |
get the elapsed time: this function is disabled for a reason.
Never use GetElapsedTime(). use FrameMove() instead. set the type of the controller
1.8.12