Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GameLogic Class Reference

#include <GameLogic.hpp>

Public Member Functions

uint activeScene () const
 
void nextScene ()
 
vector< string > const & scenes () const
 
 GameLogic (Application *app)
 
void update (double time, double timeDelta)
 
void onKeyStateChanged (int key, bool pressed)
 

Private Member Functions

void initScene ()
 
void initStaticPlane ()
 
void initStaticCloud ()
 
void initDynamicPlane ()
 
void initDynamicCloud ()
 

Private Attributes

Applicationm_app
 
vector< string > m_scenes
 
uint m_activeScene
 

Detailed Description

GameLogic is used to create scenes and handle their switches.

Definition at line 8 of file GameLogic.hpp.

Constructor & Destructor Documentation

GameLogic ( Application app)

Constructs a GameLogic-object.

Parameters
appThe global application.

Definition at line 4 of file GameLogic.cpp.

Member Function Documentation

uint activeScene ( ) const
inline

Accessor to the active scene.

Returns
The index of the active scene.

Definition at line 27 of file GameLogic.hpp.

void initDynamicCloud ( )
private

Initializes a dynamic scene in the 3D-room

Definition at line 151 of file GameLogic.cpp.

void initDynamicPlane ( )
private

Initializes a dynamic scene on a plane

Definition at line 100 of file GameLogic.cpp.

void initScene ( )
private

Initializes the currently active scene

Definition at line 30 of file GameLogic.cpp.

void initStaticCloud ( )
private

Initializes a static scene in the 3D-room

Definition at line 192 of file GameLogic.cpp.

void initStaticPlane ( )
private

Initializes a static scene on a plane

Definition at line 52 of file GameLogic.cpp.

void nextScene ( )
inline

Activates the next-scene (by round-robbing)

Definition at line 31 of file GameLogic.hpp.

void onKeyStateChanged ( int  key,
bool  pressed 
)

Callback for key-state-changes. Used to switch scenes by TAB-key.

Parameters
keyThe key
pressedWheter it was pressed or released.

Definition at line 230 of file GameLogic.cpp.

vector<string> const& scenes ( ) const
inline

Accessor to the names of all scenes.

Returns
The names of all scenes.

Definition at line 36 of file GameLogic.hpp.

void update ( double  time,
double  timeDelta 
)

Does nothing at all. Reserved for future use.

Parameters
timeThe absolute frame-time
timeDeltaThe time since the last frame

Definition at line 27 of file GameLogic.cpp.

Member Data Documentation

uint m_activeScene
private

Index of the currently active scene

Definition at line 13 of file GameLogic.hpp.

Application* m_app
private

The global application

Definition at line 10 of file GameLogic.hpp.

vector<string> m_scenes
private

All scene-names

Definition at line 12 of file GameLogic.hpp.


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