Plasma Engine  2.0
Loading...
Searching...
No Matches
plTimeStepSmoothing Class Referenceabstract

Base class for all time step smoothing algorithms. More...

#include <Clock.h>

Inheritance diagram for plTimeStepSmoothing:

Public Member Functions

virtual plTime GetSmoothedTimeStep (plTime rawTimeStep, const plClock *pClock)=0
 The function to override to implement time step smoothing.
 
virtual void Reset (const plClock *pClock)=0
 Called when plClock::Reset(), plClock::Load() or plClock::SetPaused(true) was called.
 

Detailed Description

Base class for all time step smoothing algorithms.

By deriving from this class you can implement your own algorithms for time step smoothing. Then just set an instance of that class on one of the clocks and it will be applied to the time step.

Member Function Documentation

◆ GetSmoothedTimeStep()

virtual plTime plTimeStepSmoothing::GetSmoothedTimeStep ( plTime rawTimeStep,
const plClock * pClock )
pure virtual

The function to override to implement time step smoothing.

Parameters
RawTimeStepThe actual raw time difference since the last clock update without any modification.
pClockThe clock that calls this time step smoother. Can be used to look up the clock speed and min/max time step.
Note
It is the responsibility of each plTimeStepSmoothing class to implement clock speed and also to clamp the time step to the min/max values. This allows the smoothing algorithm to override these values, if necessary.

Implemented in plDefaultTimeStepSmoothing.

◆ Reset()

virtual void plTimeStepSmoothing::Reset ( const plClock * pClock)
pure virtual

Called when plClock::Reset(), plClock::Load() or plClock::SetPaused(true) was called.

Parameters
pClockThe clock that is calling this function.

Implemented in plDefaultTimeStepSmoothing.


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