$search

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 (const char *ttf_filename)
 tgLabel ()
 Constructor of tgLabel.
 ~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

tgLabel::tgLabel (  ) 

Constructor of tgLabel.

Parameters:
w width of label in pixels
h height of label in pixels
ttf_filename file 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.

tgLabel::~tgLabel (  ) 

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.

void tgLabel::CreateLabel (  ) 

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Fri Mar 1 16:57:58 2013