Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions

mrpt::opengl::CText Class Reference


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
mrpt::opengl::CText
preview_CText.png

Definition at line 56 of file CText.h.

#include <mrpt/opengl/CText.h>

Inheritance diagram for mrpt::opengl::CText:
Inheritance graph
[legend]

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 (const std::string &str)
 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.

RTTI stuff

typedef CTextPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CText
static mrpt::utils::TRuntimeClassId classCText
static const
mrpt::utils::TRuntimeClassId
classinfo
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CTextPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 58 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 const mrpt::utils::TRuntimeClassId* mrpt::opengl::CText::_GetBaseClass (  ) [static, protected]

Reimplemented from mrpt::opengl::CRenderizable.

static CTextPtr mrpt::opengl::CText::Create (  ) [static]
static CTextPtr mrpt::opengl::CText::Create ( const std::string &  str ) [inline, static]

Class factory.

Definition at line 76 of file CText.h.

References mrpt::opengl::CText.

static mrpt::utils::CObject* mrpt::opengl::CText::CreateObject (  ) [static]
virtual mrpt::utils::CObject* mrpt::opengl::CText::duplicate (  ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

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

Definition at line 69 of file CText.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::CText::GetRuntimeClass (  ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::opengl::CRenderizable.

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

Return the current text associated to this label.

Definition at line 66 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 68 of file CText.h.

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

Sets the text to display.

Definition at line 65 of file CText.h.


Member Data Documentation

Definition at line 58 of file CText.h.

Definition at line 58 of file CText.h.

Definition at line 58 of file CText.h.

Definition at line 62 of file CText.h.

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

Definition at line 61 of file CText.h.

Definition at line 62 of file CText.h.

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

Definition at line 60 of file CText.h.




Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011