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 Attributes | List of all members
HUD Class Reference

#include <HUD.hpp>

Public Member Functions

HUDVisibility visibility () const
 
void visibility (HUDVisibility vis)
 
void nextVisibility ()
 
 HUD (Application *app)
 
void update (double time, double timeDelta)
 
void draw (double time, double timeDelta)
 
void onKeyStateChanged (int key, bool pressed)
 

Private Attributes

Applicationm_app
 
Texturem_tex
 
double m_lastSpF
 
double m_lastMeasure
 
Fontm_font
 
HUDVisibility m_visiblity
 

Detailed Description

HUD is used to draw the heads-up-display.

Definition at line 20 of file HUD.hpp.

Constructor & Destructor Documentation

HUD ( Application app)

Constructs a HUD-object.

Parameters
appThe global application

Definition at line 3 of file HUD.cpp.

Member Function Documentation

void draw ( double  time,
double  timeDelta 
)

Draws the HUD.

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

Definition at line 22 of file HUD.cpp.

void nextVisibility ( )
inline

Toggles the visiblity of the HUD using round-robbing.

Definition at line 46 of file HUD.hpp.

void onKeyStateChanged ( int  key,
bool  pressed 
)

Callback to key-state-changes.

Parameters
keyThe key
pressedWheter the key was pressed or not.

Definition at line 358 of file HUD.cpp.

void update ( double  time,
double  timeDelta 
)

Updates time-measurements.

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

Definition at line 12 of file HUD.cpp.

HUDVisibility visibility ( ) const
inline

Accessor to the current visiblity of the HUD

Returns
The current visiblity of the HUD

Definition at line 37 of file HUD.hpp.

void visibility ( HUDVisibility  vis)
inline

Accessor to the visiblity of the HUD

Parameters
visThe new visiblity of the HUD

Definition at line 42 of file HUD.hpp.

Member Data Documentation

Application* m_app
private

The global application

Definition at line 22 of file HUD.hpp.

Font* m_font
private

The font used for the HUD

Definition at line 28 of file HUD.hpp.

double m_lastMeasure
private

Timestamp of the last measure

Definition at line 26 of file HUD.hpp.

double m_lastSpF
private

The last measured seconds per frame

Definition at line 25 of file HUD.hpp.

Texture* m_tex
private

The background-texture for the HUD

Definition at line 23 of file HUD.hpp.

HUDVisibility m_visiblity
private

The current visiblity of the HUD

Definition at line 30 of file HUD.hpp.


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