Public Member Functions | Private Member Functions | Private Attributes
TomGine::tgEngine Class Reference

Class tgEngine. More...

#include <tgEngine.h>

List of all members.

Public Member Functions

void Activate2D ()
 Activates 2D rendering moder.
void Activate3D ()
 Activates 3D rendering mode; standard after Update()
void DrawCoordinates ()
 Draws a simple coordinate frame.
tgVector3 Get3DPointFrom2D (int x, int y)
void GetCamera0 (tgCamera &cam)
 get a copy of the current camera of the engine
vec3 GetCameraPosition ()
 Returns the actual position of the camera with respect to the coordinate frame.
bool GetNewPoint (vec3 &v)
bool GetWireframeMode ()
 get state of wireframe drawing mode (wireframe mode on/off)
bool InputControl (blortGLWindow::Event &event)
 Handles keyboard and mouse input applied to this window.
void LoadBackgroundImage (unsigned char *image_data, int width, int height, GLenum format=GL_RGB, bool flip=false)
void PrintText2D (std::string text, vec2 pos, int size=16)
void PrintText3D (std::string text, vec3 pos, int size=16)
void SetCamera (tgCamera cam)
 Sets Camera of rendering engine (including internal and external camera parameters)
void SetCenterOfRotation (float x, float y, float z)
 Sets center of rotation.
void SetInputRotationSpeed (float v)
void SetInputTranslationSpeed (float v)
void SetInputZoomSpeed (float v)
void SetSpeeds (float rotation, float translation, float zoom)
void Swap ()
 Swaps frame buffer to screen (called by Update() aswell)
 tgEngine (unsigned width=640, unsigned height=480, float far=10.0f, float near=0.01f, const char *name="TomGine", bool bfc=false)
 Initialising render engine.
void UnloadBackgroundImage ()
bool Update ()
 Draws content to frame screen.
bool Update (float &fTime)
bool Update (std::vector< blortGLWindow::Event > &eventlist)
bool Update (float &fTime, std::vector< blortGLWindow::Event > &eventlist)
void UpdateCameraViews (tgCamera cam)
void Welcome ()
 Welcome message.
 ~tgEngine ()

Private Member Functions

void DrawBackgroundImage ()

Private Attributes

tgTexturem_background_image
bool m_bfc
bool m_button_left
bool m_button_middle
bool m_button_right
tgCamera m_cam [6]
tgCamera m_cam_ortho
tgCamera m_camera
tgVector3 m_cor
 Center of Rotation.
float m_far
bool m_flip_background_image
tgFont m_font
float m_frametime
unsigned m_height
float m_input_rotation_speed
float m_input_translation_speed
float m_input_zoom_speed
tgLight m_light0
tgLighting m_lighting
int m_mouse_pos [2]
float m_near
bool m_show_background_image
bool m_smoothshading
tgTimer m_timer
unsigned m_width
blortGLWindow::GLWindowm_window
bool m_wireframe
bool p_pressed

Detailed Description

Class tgEngine.

Definition at line 27 of file tgEngine.h.


Constructor & Destructor Documentation

tgEngine::tgEngine ( unsigned  width = 640,
unsigned  height = 480,
float  far = 10.0f,
float  near = 0.01f,
const char *  name = "TomGine",
bool  bfc = false 
)

Initialising render engine.

Parameters:
widthWidth of rendering window in pixels
heightHeight of rendering window in pixels
depthDepth of object to render (Distance between camera and object to render in meter)
nameCaption of Window
bfcEnable / Disable back face culling (render back face of polygons or not)
Returns:
Success of initialisation

Definition at line 16 of file tgEngine.cpp.

Definition at line 90 of file tgEngine.cpp.


Member Function Documentation

Activates 2D rendering moder.

Definition at line 342 of file tgEngine.cpp.

Activates 3D rendering mode; standard after Update()

Definition at line 334 of file tgEngine.cpp.

void tgEngine::DrawBackgroundImage ( ) [private]

Definition at line 362 of file tgEngine.cpp.

Draws a simple coordinate frame.

Definition at line 297 of file tgEngine.cpp.

tgVector3 tgEngine::Get3DPointFrom2D ( int  x,
int  y 
)

Definition at line 427 of file tgEngine.cpp.

void TomGine::tgEngine::GetCamera0 ( tgCamera cam) [inline]

get a copy of the current camera of the engine

Definition at line 125 of file tgEngine.h.

Returns the actual position of the camera with respect to the coordinate frame.

Definition at line 122 of file tgEngine.h.

bool tgEngine::GetNewPoint ( vec3 v)

Definition at line 458 of file tgEngine.cpp.

get state of wireframe drawing mode (wireframe mode on/off)

Definition at line 128 of file tgEngine.h.

Handles keyboard and mouse input applied to this window.

Definition at line 161 of file tgEngine.cpp.

void tgEngine::LoadBackgroundImage ( unsigned char *  image_data,
int  width,
int  height,
GLenum  format = GL_RGB,
bool  flip = false 
)

Definition at line 352 of file tgEngine.cpp.

void tgEngine::PrintText2D ( std::string  text,
vec2  pos,
int  size = 16 
)

Definition at line 411 of file tgEngine.cpp.

void tgEngine::PrintText3D ( std::string  text,
vec3  pos,
int  size = 16 
)

Definition at line 403 of file tgEngine.cpp.

Sets Camera of rendering engine (including internal and external camera parameters)

Definition at line 316 of file tgEngine.cpp.

void tgEngine::SetCenterOfRotation ( float  x,
float  y,
float  z 
)

Sets center of rotation.

Definition at line 330 of file tgEngine.cpp.

void TomGine::tgEngine::SetInputRotationSpeed ( float  v) [inline]

Set input speed for mouse control (rotating, zooming and translating)

Definition at line 134 of file tgEngine.h.

void TomGine::tgEngine::SetInputTranslationSpeed ( float  v) [inline]

Definition at line 135 of file tgEngine.h.

void TomGine::tgEngine::SetInputZoomSpeed ( float  v) [inline]

Definition at line 136 of file tgEngine.h.

void TomGine::tgEngine::SetSpeeds ( float  rotation,
float  translation,
float  zoom 
) [inline]

Definition at line 137 of file tgEngine.h.

void tgEngine::Swap ( )

Swaps frame buffer to screen (called by Update() aswell)

Definition at line 348 of file tgEngine.cpp.

Definition at line 396 of file tgEngine.cpp.

bool tgEngine::Update ( )

Draws content to frame screen.

Parameters:
timeTime in seconds since last Update() call
eventGLX event

Definition at line 106 of file tgEngine.cpp.

bool tgEngine::Update ( float &  fTime)

Definition at line 112 of file tgEngine.cpp.

bool tgEngine::Update ( std::vector< blortGLWindow::Event > &  eventlist)

Definition at line 117 of file tgEngine.cpp.

bool tgEngine::Update ( float &  fTime,
std::vector< blortGLWindow::Event > &  eventlist 
)

Definition at line 122 of file tgEngine.cpp.

Definition at line 321 of file tgEngine.cpp.

Welcome message.

Definition at line 95 of file tgEngine.cpp.


Member Data Documentation

Definition at line 40 of file tgEngine.h.

bool TomGine::tgEngine::m_bfc [private]

Definition at line 55 of file tgEngine.h.

Definition at line 56 of file tgEngine.h.

Definition at line 56 of file tgEngine.h.

Definition at line 56 of file tgEngine.h.

Definition at line 42 of file tgEngine.h.

Definition at line 44 of file tgEngine.h.

Definition at line 43 of file tgEngine.h.

Center of Rotation.

Definition at line 49 of file tgEngine.h.

float TomGine::tgEngine::m_far [private]

Definition at line 32 of file tgEngine.h.

Definition at line 60 of file tgEngine.h.

Definition at line 63 of file tgEngine.h.

Definition at line 54 of file tgEngine.h.

unsigned TomGine::tgEngine::m_height [private]

Definition at line 31 of file tgEngine.h.

Definition at line 35 of file tgEngine.h.

Definition at line 36 of file tgEngine.h.

Definition at line 37 of file tgEngine.h.

Definition at line 47 of file tgEngine.h.

Definition at line 46 of file tgEngine.h.

Definition at line 51 of file tgEngine.h.

float TomGine::tgEngine::m_near [private]

Definition at line 33 of file tgEngine.h.

Definition at line 59 of file tgEngine.h.

Definition at line 58 of file tgEngine.h.

Definition at line 48 of file tgEngine.h.

unsigned TomGine::tgEngine::m_width [private]

Definition at line 30 of file tgEngine.h.

Definition at line 39 of file tgEngine.h.

Definition at line 57 of file tgEngine.h.

Definition at line 52 of file tgEngine.h.


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


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:13