Gamedev Framework (gf)  0.8.0
A C++14 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
[legend]

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 ( )
virtual

Destructor.

Member Function Documentation

◆ update()

virtual void gf::Model::update ( Time  time)
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
timeThe time since the last update
See also
gf::ModelContainer::update()

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