Gamedev Framework (gf)  0.3.0
A C++11 framework for 2D games
Public Member Functions | List of all members
gf::Model Class Reference

A game object that can be updated. More...

#include <gf/Model.h>

Public Member Functions

virtual ~Model ()
 Destructor. More...
 
virtual void update (float dt)
 Update the model's state. More...
 

Detailed Description

A game object that can be updated.

gf::Model represents a game object that is updated but not rendered. It is simpler than a gf::Entity because it has no priority and no liveness property.

It can typically be used to encapsulate a physics engine.

Models can be grouped in a gf::ModelContainer.

See also
gf::ModelContainer, gf::Entity

Constructor & Destructor Documentation

virtual gf::Model::~Model ( )
virtual

Destructor.

Member Function Documentation

virtual void gf::Model::update ( float  dt)
virtual

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.

Parameters
dtThe time (in seconds) since the last update
See also
gf::ModelContainer::update()