Gamedev Framework (gf)
0.11.0
A C++14 framework for 2D games

Fixed timestep model. More...
#include <gf/Models.h>
Public Member Functions  
FixedTimestepModel (Model &model, Time timestep=gf::seconds(1/60.0f))  
Constructor. More...  
virtual void  update (Time time) override 
Update the model's state. More...  
Public Member Functions inherited from gf::Model  
virtual  ~Model () 
Destructor. More...  
Fixed timestep model.
This model takes another model that needs a fixed timestep and provides it event if the original timestep is not fixed. This may be useful for physics model, for example.
Constructor.
model  The original model 
timestep  The fixed timestep 

overridevirtual 
Update the model's state.
Models are updated each frame. The time between two frames is given as a parameter to help in the update. This time is in seconds.
time  The time since the last update 
Reimplemented from gf::Model.