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

#include <tgLabel.h>

List of all members.

Public Member Functions

void AddText (const char *text, unsigned size=20)
 adds text to the label, should not be called at framerate, since it creates a texture on the GPU
const char * c_str ()
void Clear ()
 clears the text of the label and destroys texture for it on the GPU
void CreateLabel ()
void Draw () const
 draws the label at frame rate, should be called after everything else is rendered, since depth-testing is disabled
void SetFont (const char *ttf_filename)
void SetPose (tgPose pose)
 tgLabel ()
 Constructor of tgLabel.
 tgLabel (const char *ttf_filename)
 ~tgLabel ()

Private Attributes

tgFontm_font
std::string m_fontfilename
float m_height
unsigned m_maxStrLen
tgPose m_pose
std::vector< std::string > m_text
tgTexturem_texture
unsigned m_txtHeight
unsigned m_txtSize
float m_width

Detailed Description

Definition at line 22 of file tgLabel.h.


Constructor & Destructor Documentation

Constructor of tgLabel.

Parameters:
wwidth of label in pixels
hheight of label in pixels
ttf_filenamefile name of true type font (ttf) to use for text

Definition at line 9 of file tgLabel.cpp.

tgLabel::tgLabel ( const char *  ttf_filename)

Definition at line 16 of file tgLabel.cpp.

Definition at line 24 of file tgLabel.cpp.


Member Function Documentation

void tgLabel::AddText ( const char *  text,
unsigned  size = 20 
)

adds text to the label, should not be called at framerate, since it creates a texture on the GPU

Definition at line 34 of file tgLabel.cpp.

const char* TomGine::tgLabel::c_str ( ) [inline]

Definition at line 64 of file tgLabel.h.

void tgLabel::Clear ( )

clears the text of the label and destroys texture for it on the GPU

Definition at line 83 of file tgLabel.cpp.

Definition at line 44 of file tgLabel.cpp.

void tgLabel::Draw ( ) const

draws the label at frame rate, should be called after everything else is rendered, since depth-testing is disabled

Definition at line 94 of file tgLabel.cpp.

void TomGine::tgLabel::SetFont ( const char *  ttf_filename) [inline]

Definition at line 48 of file tgLabel.h.

void TomGine::tgLabel::SetPose ( tgPose  pose) [inline]

Definition at line 49 of file tgLabel.h.


Member Data Documentation

Definition at line 32 of file tgLabel.h.

std::string TomGine::tgLabel::m_fontfilename [private]

Definition at line 35 of file tgLabel.h.

float TomGine::tgLabel::m_height [private]

Definition at line 26 of file tgLabel.h.

unsigned TomGine::tgLabel::m_maxStrLen [private]

Definition at line 29 of file tgLabel.h.

Definition at line 31 of file tgLabel.h.

std::vector<std::string> TomGine::tgLabel::m_text [private]

Definition at line 34 of file tgLabel.h.

Definition at line 33 of file tgLabel.h.

unsigned TomGine::tgLabel::m_txtHeight [private]

Definition at line 28 of file tgLabel.h.

unsigned TomGine::tgLabel::m_txtSize [private]

Definition at line 27 of file tgLabel.h.

float TomGine::tgLabel::m_width [private]

Definition at line 25 of file tgLabel.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