Gamedev Framework (gf)  0.5.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>

Inheritance diagram for gf::Model:
Inheritance graph

Public Member Functions

virtual ~Model ()
 Destructor. More...
virtual void update (Time time)
 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

◆ ~Model()

virtual gf::Model::~Model ( )


Member Function Documentation

◆ update()

virtual void gf::Model::update ( Time  time)

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.

timeThe time since the last update
See also

Reimplemented in gf::PhysicsModel, and gf::FixedTimestepModel.