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
Application Class Reference

#include <Application.hpp>

Public Member Functions

ConfigurationgetConfig ()
 
WindowgetWindow ()
 
TexturesgetTextures ()
 
ShadersgetShaders ()
 
SceneGraphgetSceneGraph ()
 
SceneFBOgetSceneFBO ()
 
SimpleMeshesgetSimpleMeshes ()
 
ScenesgetScenes ()
 
CameragetCamera ()
 
SpriteRenderergetSprites ()
 
TextRenderergetText ()
 
PickergetPicker ()
 
GameLogicgetGameLogic ()
 
OwnCursorgetOwnCursor ()
 
TaskManagergetTasks ()
 
vec4 const & getBackColor () const
 
void setBackColor (vec4 const &color)
 
 Application ()
 
void run ()
 
void onWindowSizeChanged (vec2 const &size)
 
void onKeyStateChanged (int key, bool pressed)
 

Private Member Functions

void render (double time, double timeDelta)
 
void update (double time, double timeDelta)
 

Private Attributes

Configuration m_cfg
 
Window m_window
 
Textures m_textures
 
Shaders m_shaders
 
SceneFBO m_fbo
 
SceneGraph m_sceneGraph
 
SimpleMeshes m_simpleMeshes
 
Scenes m_scenes
 
Camera m_camera
 
SpriteRenderer m_sprites
 
TextRenderer m_text
 
Picker m_picker
 
HUD m_hud
 
GameLogic m_gameLogic
 
vec4 m_backColor
 
OwnCursor m_ownCursor
 
TaskManager m_tasks
 

Detailed Description

Application is the class that hosts the whole program. It may only be intanciated once.

Definition at line 10 of file Application.hpp.

Constructor & Destructor Documentation

Constructs an Application object.

Definition at line 4 of file Application.cpp.

Member Function Documentation

vec4 const& getBackColor ( ) const
inline

Accessor to the windows back color.

Returns
The windows back color.

Definition at line 112 of file Application.hpp.

Camera& getCamera ( )
inline

Accessor to the camera.

Returns
The camera.

Definition at line 76 of file Application.hpp.

Configuration& getConfig ( )
inline

Accessor to the config-file.

Returns
The config-file.

Definition at line 36 of file Application.hpp.

GameLogic& getGameLogic ( )
inline

Accessor to the game-logic.

Returns
The game-logic.

Definition at line 96 of file Application.hpp.

OwnCursor& getOwnCursor ( )
inline

Accessor to the own cursor implementation.

Returns
The own cursor implementation.

Definition at line 101 of file Application.hpp.

Picker& getPicker ( )
inline

Accessor to the picker.

Returns
The picker.

Definition at line 91 of file Application.hpp.

SceneFBO& getSceneFBO ( )
inline

Accessor to the scene-FBO.

Returns
The scene-FBO.

Definition at line 61 of file Application.hpp.

SceneGraph& getSceneGraph ( )
inline

Accessor to the scene-graph.

Returns
The scene-graph.

Definition at line 56 of file Application.hpp.

Scenes& getScenes ( )
inline

Accessor to scenes-manager.

Returns
The scenes-manager.

Definition at line 71 of file Application.hpp.

Shaders& getShaders ( )
inline

Accessor to the shader-manager.

Returns
The shader-manager.

Definition at line 51 of file Application.hpp.

SimpleMeshes& getSimpleMeshes ( )
inline

Accessor to the simple-meshes-manager.

Returns
The simple-meshes-manager.

Definition at line 66 of file Application.hpp.

SpriteRenderer& getSprites ( )
inline

Accessor to the sprite-renderer.

Returns
The sprite-renderer.

Definition at line 81 of file Application.hpp.

TaskManager& getTasks ( )
inline

Accessor to the task-manager for parallel tasks.

Returns
The task-manager for parallel tasks.

Definition at line 106 of file Application.hpp.

TextRenderer& getText ( )
inline

Accessor to the text-renderer.

Returns
The text-renderer.

Definition at line 86 of file Application.hpp.

Textures& getTextures ( )
inline

Accessor to the texture-manager.

Returns
The texture-manager.

Definition at line 46 of file Application.hpp.

Window& getWindow ( )
inline

Accessor to the window.

Returns
The window.

Definition at line 41 of file Application.hpp.

void onKeyStateChanged ( int  key,
bool  pressed 
)

Callback for key-state-changes. Distributes the callback to all modules that need it.

Parameters
keyThe key
pressedWheter the key is pressed or released

Definition at line 81 of file Application.cpp.

void onWindowSizeChanged ( vec2 const &  size)

Callback for window-size-changes. Distributes the callback to all modules that need it.

Parameters
sizeThe new window-size.

Definition at line 75 of file Application.cpp.

void render ( double  time,
double  timeDelta 
)
private

Renders a frame.

Parameters
timeThe absolute frame time
timeDeltaThe time since the last frame

Definition at line 65 of file Application.cpp.

void run ( )

Runs the program. This call is blocking until the appliation will be terminated.

Definition at line 23 of file Application.cpp.

void setBackColor ( vec4 const &  color)
inline

Accessor to the windows back color.

Parameters
colorThe new windows back color.

Definition at line 118 of file Application.hpp.

void update ( double  time,
double  timeDelta 
)
private

Updates all data-strutures.

Parameters
timeThe absolute frame time
timeDeltaThe time since the last frame

Definition at line 48 of file Application.cpp.

Member Data Documentation

vec4 m_backColor
private

The windows back-color

Definition at line 26 of file Application.hpp.

Camera m_camera
private

The camera

Definition at line 20 of file Application.hpp.

Configuration m_cfg
private

The config-file

Definition at line 12 of file Application.hpp.

SceneFBO m_fbo
private

The scene-FBO

Definition at line 16 of file Application.hpp.

GameLogic m_gameLogic
private

The game logic

Definition at line 25 of file Application.hpp.

HUD m_hud
private

The HUD

Definition at line 24 of file Application.hpp.

OwnCursor m_ownCursor
private

The own cursor implementation

Definition at line 27 of file Application.hpp.

Picker m_picker
private

The picker

Definition at line 23 of file Application.hpp.

SceneGraph m_sceneGraph
private

The scene-graph

Definition at line 17 of file Application.hpp.

Scenes m_scenes
private

The scene-manager

Definition at line 19 of file Application.hpp.

Shaders m_shaders
private

Shader-manager

Definition at line 15 of file Application.hpp.

SimpleMeshes m_simpleMeshes
private

The simple-meshes-manager

Definition at line 18 of file Application.hpp.

SpriteRenderer m_sprites
private

The sprite-renderer

Definition at line 21 of file Application.hpp.

TaskManager m_tasks
private

The task-manager for parallel tasks

Definition at line 28 of file Application.hpp.

TextRenderer m_text
private

The text-renderer

Definition at line 22 of file Application.hpp.

Textures m_textures
private

Texture-manager

Definition at line 14 of file Application.hpp.

Window m_window
private

The window

Definition at line 13 of file Application.hpp.


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