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

osgText::Text Class Reference

Inheritance diagram for osgText::Text:

Inheritance graph
[legend]
List of all members.

Public Types

enum  AlignmentType {
  LEFT_TOP, LEFT_CENTER, LEFT_BOTTOM, CENTER_TOP,
  CENTER_CENTER, CENTER_BOTTOM, RIGHT_TOP, RIGHT_CENTER,
  RIGHT_BOTTOM
}
enum  BoundingBoxType { GEOMETRY, GLYPH }
enum  DrawModeType { TEXT = 1<<0, BOUNDINGBOX = 1<<1, ALIGNMENT = 1<<2, DEFAULT = TEXT }

Public Methods

 Text ()
 Text (const Text &text, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Text (Font *font)
virtual osg::ObjectcloneType () const
 Clone the type of an object, with Object* return type.

virtual osg::Objectclone (const osg::CopyOp &copyop) const
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const char * className () const
 return the name of the object's class type.

virtual const char * libraryName () const
 return the name of the object's library.

void setPosition (const osg::Vec2 &pos)
void setPosition (const osg::Vec3 &pos)
const osg::Vec3getPosition () const
void setColor (const osg::Vec4 &color)
osg::Vec4getColor ()
const osg::Vec4getColor () const
void setDrawMode (int mode)
int getDrawMode () const
void setBoundingBox (int mode)
int getBoundingBox () const
void setAlignment (int alignment)
int getAlignment () const
void setFont (Font *font)
FontgetFont ()
const FontgetFont () const
void setText (const char *text)
void setText (const std::string &text)
const std::string & getText () const
virtual void drawImmediateMode (osg::State &state)
 draw directly ignoring an OpenGL display list which could be attached.

virtual void drawBoundingBox (void)
virtual void drawAlignment (void)
const osg::Vec3getAlignmentPos () const

Protected Types

enum  FontType {
  UNDEF, BITMAP, PIXMAP, OUTLINE,
  POLYGON, TEXTURE
}

Protected Methods

virtual ~Text ()
virtual void setDefaults (void)
virtual const bool computeBound (void) const
 compute the bounding box of the drawable.

virtual void calcBounds (osg::Vec3 *min, osg::Vec3 *max) const
void initAlignment (osg::Vec3 *min, osg::Vec3 *max)
bool initAlignment (void)

Protected Attributes

osg::ref_ptr< Font_font
bool _init
bool _initAlignment
std::string _text
int _fontType
int _alignment
int _drawMode
int _boundingBoxType
osg::Vec3 _pos
osg::Vec3 _alignmentPos
osg::Vec4 _color

Member Enumeration Documentation

enum osgText::Text::AlignmentType
 

Enumeration values:
LEFT_TOP 
LEFT_CENTER 
LEFT_BOTTOM 
CENTER_TOP 
CENTER_CENTER 
CENTER_BOTTOM 
RIGHT_TOP 
RIGHT_CENTER 
RIGHT_BOTTOM 

enum osgText::Text::BoundingBoxType
 

Enumeration values:
GEOMETRY 
GLYPH 

enum osgText::Text::DrawModeType
 

Enumeration values:
TEXT 
BOUNDINGBOX 
ALIGNMENT 
DEFAULT 

enum osgText::Text::FontType [protected]
 

Enumeration values:
UNDEF 
BITMAP 
PIXMAP 
OUTLINE 
POLYGON 
TEXTURE 


Constructor & Destructor Documentation

osgText::Text::Text  
 

osgText::Text::Text const Text &    text,
const osg::CopyOp   copyop = osg::CopyOp::SHALLOW_COPY
 

osgText::Text::Text Font   font
 

virtual osgText::Text::~Text   [protected, virtual]
 


Member Function Documentation

virtual void osgText::Text::calcBounds osg::Vec3   min,
osg::Vec3   max
const [protected, virtual]
 

virtual const char* osgText::Text::className   const [inline, virtual]
 

return the name of the object's class type.

Must be defined by derived classes.

Reimplemented from osg::Drawable.

virtual osg::Object* osgText::Text::clone const osg::CopyOp   copyop const [inline, virtual]
 

virtual osg::Object* osgText::Text::cloneType   const [inline, virtual]
 

Clone the type of an object, with Object* return type.

Must be defined by derived classes.

Implements osg::Object.

virtual const bool osgText::Text::computeBound void    const [protected, virtual]
 

compute the bounding box of the drawable.

Method must be implemented by subclasses.

Reimplemented from osg::Drawable.

virtual void osgText::Text::drawAlignment void    [virtual]
 

virtual void osgText::Text::drawBoundingBox void    [virtual]
 

virtual void osgText::Text::drawImmediateMode osg::State   state [virtual]
 

draw directly ignoring an OpenGL display list which could be attached.

This is the internal draw method which does the drawing itself, and is the method to override when deriving from Drawable.

Implements osg::Drawable.

int osgText::Text::getAlignment   const [inline]
 

const osg::Vec3& osgText::Text::getAlignmentPos   const [inline]
 

int osgText::Text::getBoundingBox   const [inline]
 

const osg::Vec4& osgText::Text::getColor   const [inline]
 

osg::Vec4& osgText::Text::getColor   [inline]
 

int osgText::Text::getDrawMode   const [inline]
 

const Font* osgText::Text::getFont   const [inline]
 

Font* osgText::Text::getFont   [inline]
 

const osg::Vec3& osgText::Text::getPosition   const [inline]
 

const std::string& osgText::Text::getText   const [inline]
 

bool osgText::Text::initAlignment void    [protected]
 

void osgText::Text::initAlignment osg::Vec3   min,
osg::Vec3   max
[protected]
 

virtual bool osgText::Text::isSameKindAs const osg::Object   obj const [inline, virtual]
 

virtual const char* osgText::Text::libraryName   const [inline, virtual]
 

return the name of the object's library.

Must be defined by derived classes. The OpenSceneGraph convention the is that the namspace of a library is the same as the library name.

Reimplemented from osg::Drawable.

void osgText::Text::setAlignment int    alignment
 

void osgText::Text::setBoundingBox int    mode
 

void osgText::Text::setColor const osg::Vec4   color [inline]
 

virtual void osgText::Text::setDefaults void    [protected, virtual]
 

void osgText::Text::setDrawMode int    mode [inline]
 

void osgText::Text::setFont Font   font
 

void osgText::Text::setPosition const osg::Vec3   pos
 

void osgText::Text::setPosition const osg::Vec2   pos
 

void osgText::Text::setText const std::string &    text [inline]
 

void osgText::Text::setText const char *    text [inline]
 


Member Data Documentation

int osgText::Text::_alignment [protected]
 

osg::Vec3 osgText::Text::_alignmentPos [protected]
 

int osgText::Text::_boundingBoxType [protected]
 

osg::Vec4 osgText::Text::_color [protected]
 

int osgText::Text::_drawMode [protected]
 

osg::ref_ptr<Font> osgText::Text::_font [protected]
 

int osgText::Text::_fontType [protected]
 

bool osgText::Text::_init [protected]
 

bool osgText::Text::_initAlignment [protected]
 

osg::Vec3 osgText::Text::_pos [protected]
 

std::string osgText::Text::_text [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:56 2002 for the Open Scene Graph by doxygen 1.2.16.