Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglTexturedTextSet Class Reference

#include <sglTexturedTextSet.hpp>

Inheritance diagram for sglTexturedTextSet::

sglDrawable sglObject List of all members.

Public Methods

 sglTexturedTextSet (sglTextureFont *font)
virtual ~sglTexturedTextSet ()
void setString (const string &str)
const string& getString () const
void setFont (sglTextureFont *font)
sglTextureFontgetFont () const
void setColor (const sglVec4f &color)
void setColor (float r, float g, float b, float a)
void getColor (sglVec4f &color) const
void setPosition (const sglVec3f &pos)
void setPosition (float x, float y, float z)
const sglVec3f& getPosition () const
void setCharHeight (float height)
float getHeight () const
float getWidth () const
void setVertical (bool on)
bool getVertical () const
virtual void addStats (sglStats &stats) const
virtual void drawGeometry (const vector< sglTexCoords > &tex_coords) const
virtual sglBound::IntersectResultEnum intersectPrim (sglIntersectf &segset)
virtual sglBound::IntersectResultEnum intersectPrim (sglIntersectd &segset)
virtual void printInfo (ostream &ostrm, const char *indent_string) const

Protected Methods

void updateArrays ()
virtual bool computeBounds ()

Detailed Description

sglTexturedTextSet is a special subclass of sglDrawable that contains geometry to render a text string in world space in the scene. The text is rendered in the XY plane.

Definition at line 43 of file sglTexturedTextSet.hpp.


Constructor & Destructor Documentation

sglTexturedTextSet::sglTexturedTextSet ( sglTextureFont * font )
 

Constructor.

Parameters:
font   The texture font to use.

sglTexturedTextSet::~sglTexturedTextSet ( ) [virtual]
 

Destructor.


Member Function Documentation

void sglTexturedTextSet::setString ( const string & str )
 

Set the string to render.

Parameters:
str   the string to render

const string & sglTexturedTextSet::getString ( ) const [inline]
 

Get the string to render.

Returns:
the string to render

Definition at line 62 of file sglTexturedTextSet.hpp.

void sglTexturedTextSet::setFont ( sglTextureFont * font )
 

Set the font to use.

Parameters:
font   The font to use. If NULL, nothing will render.

sglTextureFont * sglTexturedTextSet::getFont ( ) const [inline]
 

Get the font to use.

Returns:
the font to use

Definition at line 72 of file sglTexturedTextSet.hpp.

void sglTexturedTextSet::setColor ( const sglVec4f & color )
 

Set the text color.

Parameters:
color   the text color; default (1,1,1,1)

void sglTexturedTextSet::setColor ( float r,
float g,
float b,
float a )
 

Set the text color (default is white opaque).

Parameters:
r   Red color component.
g   Green color component.
b   Blue color component.
a   Alpha color component.

void sglTexturedTextSet::getColor ( sglVec4f & color ) const
 

Get the text color.

Returns:
the text color

void sglTexturedTextSet::setPosition ( const sglVec3f & pos )
 

Set the offset vector.

Parameters:
pos   The offset vector (default: 0, 0, 0).

void sglTexturedTextSet::setPosition ( float x,
float y,
float z )
 

Set the offset vector.

Parameters:
x   X component of the offset vector.
y   Y component of the offset vector.
z   Z component of the offset vector.

const sglVec3f & sglTexturedTextSet::getPosition ( ) const [inline]
 

Get the current offset vector.

Returns:
The current offset vector.

Definition at line 107 of file sglTexturedTextSet.hpp.

void sglTexturedTextSet::setCharHeight ( float height )
 

Set the height (in world space) of each character in the string.

Parameters:
height   the height of each character

float sglTexturedTextSet::getHeight ( ) const
 

Get the height of the text string in world space.

Returns:
the height of the text string in world space

float sglTexturedTextSet::getWidth ( ) const
 

Gets the width of the text string in world space.

Returns:
the width of the text string in world space

void sglTexturedTextSet::setVertical ( bool on )
 

Controls whether the string flows left to right or top to bottom.

Parameters:
on   If true, text flows top down.

bool sglTexturedTextSet::getVertical ( ) const [inline]
 

Gets the direction of text.

Returns:
True if text flows top down.

Definition at line 132 of file sglTexturedTextSet.hpp.

virtual void sglTexturedTextSet::addStats ( sglStats & stats ) const [virtual]
 

Add this drawable's stats to the given sglStats.

Parameters:
stats   The sglStats object to which to add the statistics.

Reimplemented from sglDrawable.

virtual sglBound::IntersectResultEnum sglTexturedTextSet::intersectPrim ( sglIntersectf & segset ) [virtual]
 

default behaviour for unimplemented versions.

Reimplemented from sglDrawable.

void sglTexturedTextSet::printInfo ( ostream & ostrm,
const char * indent_string ) const [virtual]
 

Output the state of this node to the specified stream. See sglObject::printInfo() for details.

Reimplemented from sglDrawable.

virtual bool sglTexturedTextSet::computeBounds ( ) [protected, virtual]
 

Compute the bounding box for this geometry and fill in the member variable, m_bbox, in this class.

Returns:
true if successful (all information is available for computing a bounding box), otherwise false.

Reimplemented from sglDrawable.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:10 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001