Logo Search packages:      
Sourcecode: 3depict version File versions  Download package

DrawGLText Class Reference

#include <drawables.h>

Inheritance diagram for DrawGLText:


List of all members.

Detailed Description

A class to draw text obects using FTGL.

Definition at line 473 of file drawables.h.

Public Member Functions

DrawableObjclone () const
 Clone object.
void draw () const
 Render the text string.
 DrawGLText (std::string fontFile, unsigned int ftglTextMode)
 Constructor (font file & text mode).
void getBoundingBox (BoundCube &b) const
 Get the bounding box for the text.
Point3D getOrigin () const
 Return the location of the lower-left of the text.
bool ok () const
 Returs true if the class data is good.
void setActive (bool active)
 Set the active state of the object.
void setAlignment (unsigned int mode)
 Set the text alignment (default is left).
void setColour (float r, float g, float b, float a)
 Set the colour (rgba) of the object.
void setDepth (unsigned int depth)
 Set the depth of the text (in points, may be GL units, unsure).
void setInteract (bool canAct)
 Set if user can interact with object, needed for opengl hit testing.
void setOrigin (const Point3D &p)
 Set the origin.
void setReadDir (const Point3D &p)
 Set the reading direction.
void setReadFromNorm (bool b)
void setSize (unsigned int size)
 Set the size of the text (in points (which may be GL units,.
void setString (std::string str)
 Set the text string to be displayed.
void setTextDir (const Point3D &p)
 Set the text flow direction.
void setUp (const Point3D &p)
 Set the up direction for the text.
virtual ~DrawGLText ()

Static Public Member Functions

static void setCurCamera (const Camera *)
 Set the camera used to draw scene.

Public Attributes

bool canSelect
 Can be selected from openGL viewport interactively?
bool wantsLight
 Wants lighting calculations active during render?

Protected Attributes

bool active
 Is the drawable active?

Private Attributes

float a
unsigned int alignMode
 Alignment mode.
float b
unsigned int curFontMode
 Current font mode.
bool ensureReadFromNorm
 Ensure that the text is never mirrored from view direction.
FTFont * font
 FTGL font instance.
std::string fontString
 Font string.
float g
bool isOK
 True if no erro.
Point3D origin
 Origin of text.
float r
 Colours for text.
Point3D readDir
 Direction for which text should be legible.
std::string strText
 Text string.
Point3D textDir
 Text flow direction.
Point3D up
 Up direction for text.

Static Private Attributes

static const CameracurCamera = 0
 pointer to current camera

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

Generated by  Doxygen 1.6.0   Back to index