MRPT logo

mrpt::opengl::CText Class Reference

A 2D text (bitmap rendering): it always "faces the observer" despite it's at some 3D location. More...

#include <mrpt/opengl/CText.h>

Inheritance diagram for mrpt::opengl::CText:

mrpt::opengl::CRenderizable mrpt::utils::CSerializable

List of all members.

Public Member Functions

void setString (const std::string &s)
 Sets the text to display.
std::string getString () const
 Return the current text associated to this label.
void setFont (const std::string &s, int height)
 Sets the font (It has no effect yet!).
std::string getFont () const
void render () const
 Render.

Static Public Member Functions

static CTextPtr Create ()
 Class factory.

Protected Attributes

std::string m_str
std::string m_fontName
int m_fontHeight
int m_fontWidth

Private Member Functions

 CText (const std::string &str=std::string(""))
 Constructor.
virtual ~CText ()
 Private, virtual destructor: only can be deleted from smart pointers.


Detailed Description

A 2D text (bitmap rendering): it always "faces the observer" despite it's at some 3D location.

Use setString and setFont to change the text displayed by this object.

Note:
All texts appear with the font GLUT_BITMAP_TIMES_ROMAN_10 for now (i.e. setFont is ignored)
See also:
opengl::COpenGLScene

Definition at line 49 of file CText.h.


Constructor & Destructor Documentation

mrpt::opengl::CText::CText ( const std::string &  str = std::string("")  )  [private]

Constructor.

virtual mrpt::opengl::CText::~CText (  )  [private, virtual]

Private, virtual destructor: only can be deleted from smart pointers.


Member Function Documentation

static CTextPtr mrpt::opengl::CText::Create (  )  [inline, static]

Class factory.

Definition at line 69 of file CText.h.

References mrpt::opengl::CText.

std::string mrpt::opengl::CText::getFont (  )  const [inline]

Definition at line 62 of file CText.h.

std::string mrpt::opengl::CText::getString (  )  const [inline]

Return the current text associated to this label.

Definition at line 59 of file CText.h.

void mrpt::opengl::CText::render (  )  const [virtual]

Render.

Implements mrpt::opengl::CRenderizable.

void mrpt::opengl::CText::setFont ( const std::string &  s,
int  height 
) [inline]

Sets the font (It has no effect yet!).

Definition at line 61 of file CText.h.

void mrpt::opengl::CText::setString ( const std::string &  s  )  [inline]

Sets the text to display.

Definition at line 58 of file CText.h.


Member Data Documentation

Definition at line 55 of file CText.h.

std::string mrpt::opengl::CText::m_fontName [protected]

Definition at line 54 of file CText.h.

Definition at line 55 of file CText.h.

std::string mrpt::opengl::CText::m_str [protected]

Definition at line 53 of file CText.h.




Page generated by Doxygen 1.5.7.1 for MRPT 0.6.5 SVN: at Mon Feb 23 13:25:04 EST 2009