OpenSceneGraph  3.0.1
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
osgText::Text3D Class Reference
Inheritance diagram for osgText::Text3D:
Inheritance graph
[legend]

List of all members.

Classes

struct  GlyphRenderInfo

Public Types

enum  RenderMode { PER_FACE, PER_GLYPH }
 Reder mode used to render the Text. More...

Public Member Functions

 Text3D ()
 Text3D (const Text3D &text, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgText, Text3D) float getCharacterDepth() const
 Get the Charactere Depth of text.
void setCharacterDepth (float characterDepth)
 Set the Charactere Depth of text.
RenderMode getRenderMode () const
 Get the render mode used to render the text.
void setRenderMode (RenderMode renderMode)
 Set the render mode used to render the text.
osg::StateSetgetWallStateSet ()
 Get the wall StateSet.
const osg::StateSetgetWallStateSet () const
 Get the wall StateSet.
osg::StateSetgetOrCreateWallStateSet ()
 Get or create the wall StateSet.
void setWallStateSet (osg::StateSet *wallStateSet)
 Set the wall StateSet.
osg::StateSetgetBackStateSet ()
 Get the back StateSet.
osg::StateSetgetBackStateSet () const
 Get the back StateSet.
osg::StateSetgetOrCreateBackStateSet ()
 Get or create the back StateSet.
void setBackStateSet (osg::StateSet *backStateSet)
 Set the back StateSet.
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 Draw the text.
virtual bool supports (const osg::Drawable::AttributeFunctor &) const
 return false, osgText::Text does not support accept(AttributeFunctor&).
virtual bool supports (const osg::Drawable::ConstAttributeFunctor &) const
 return true, osgText::Text does support accept(ConstAttributeFunctor&).
virtual void accept (osg::Drawable::ConstAttributeFunctor &af) const
 accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.
virtual bool supports (const osg::PrimitiveFunctor &) const
 return true, osgText::Text does support accept(PrimitiveFunctor&) .
virtual void accept (osg::PrimitiveFunctor &pf) const
 accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.
virtual void setThreadSafeRefUnref (bool threadSafe)
 Set whether to use a mutex to ensure ref() and unref() are thread safe.
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 Resize any per context GLObject buffers to specified size.
virtual void releaseGLObjects (osg::State *state=0) const
 If State is non-zero, this function releases OpenGL objects for the specified graphics context.
virtual osg::BoundingBox computeBound () const
 Compute the bounding box around Drawables's geometry.

Protected Types

typedef std::vector
< GlyphRenderInfo
LineRenderInfo
typedef std::vector
< LineRenderInfo
TextRenderInfo

Protected Member Functions

virtual ~Text3D ()
void renderPerGlyph (osg::State &state) const
void renderPerFace (osg::State &state) const
String::iterator computeLastCharacterOnLine (osg::Vec2 &cursor, String::iterator first, String::iterator last)
void computeGlyphRepresentation ()
void computePositions (unsigned int contextID) const

Protected Attributes

TextRenderInfo _textRenderInfo
RenderMode _renderMode
osg::ref_ptr< osg::StateSet_wallStateSet
osg::ref_ptr< osg::StateSet_backStateSet

Friends

class Font

Member Typedef Documentation

typedef std::vector<GlyphRenderInfo> osgText::Text3D::LineRenderInfo [protected]
typedef std::vector<LineRenderInfo> osgText::Text3D::TextRenderInfo [protected]

Member Enumeration Documentation

Reder mode used to render the Text.

PER_FACE : render all front face with the default StateSet all wall face with the wall StateSet all back face with the back StateSet (back face of the character, no the OpenGL back face)

PER_GLYPH : render all Charactere with the default StateSet

Enumerator:
PER_FACE 
PER_GLYPH 

Constructor & Destructor Documentation

osgText::Text3D::Text3D ( )
osgText::Text3D::Text3D ( const Text3D text,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)
virtual osgText::Text3D::~Text3D ( ) [inline, protected, virtual]

Member Function Documentation

virtual void osgText::Text3D::accept ( osg::Drawable::ConstAttributeFunctor af) const [virtual]

accept an ConstAttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.

Reimplemented from osg::Drawable.

virtual void osgText::Text3D::accept ( osg::PrimitiveFunctor pf) const [virtual]

accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.

Reimplemented from osg::Drawable.

virtual osg::BoundingBox osgText::Text3D::computeBound ( ) const [virtual]

Compute the bounding box around Drawables's geometry.

Reimplemented from osgText::TextBase.

void osgText::Text3D::computeGlyphRepresentation ( ) [protected, virtual]

Implements osgText::TextBase.

String::iterator osgText::Text3D::computeLastCharacterOnLine ( osg::Vec2 cursor,
String::iterator  first,
String::iterator  last 
) [protected]

Reimplemented from osgText::TextBase.

void osgText::Text3D::computePositions ( unsigned int  contextID) const [protected, virtual]

Implements osgText::TextBase.

virtual void osgText::Text3D::drawImplementation ( osg::RenderInfo renderInfo) const [virtual]

Draw the text.

Implements osg::Drawable.

osg::StateSet* osgText::Text3D::getBackStateSet ( ) [inline]

Get the back StateSet.

osg::StateSet* osgText::Text3D::getBackStateSet ( ) const [inline]

Get the back StateSet.

osg::StateSet* osgText::Text3D::getOrCreateBackStateSet ( ) [inline]

Get or create the back StateSet.

osg::StateSet* osgText::Text3D::getOrCreateWallStateSet ( ) [inline]

Get or create the wall StateSet.

RenderMode osgText::Text3D::getRenderMode ( ) const [inline]

Get the render mode used to render the text.

osg::StateSet* osgText::Text3D::getWallStateSet ( ) [inline]

Get the wall StateSet.

const osg::StateSet* osgText::Text3D::getWallStateSet ( ) const [inline]

Get the wall StateSet.

osgText::Text3D::META_Object ( osgText  ,
Text3D   
) const

Get the Charactere Depth of text.

virtual void osgText::Text3D::releaseGLObjects ( osg::State state = 0) const [virtual]

If State is non-zero, this function releases OpenGL objects for the specified graphics context.

Otherwise, releases OpenGL objexts for all graphics contexts.

Reimplemented from osgText::TextBase.

void osgText::Text3D::renderPerFace ( osg::State state) const [protected]
void osgText::Text3D::renderPerGlyph ( osg::State state) const [protected]
virtual void osgText::Text3D::resizeGLObjectBuffers ( unsigned int  maxSize) [virtual]

Resize any per context GLObject buffers to specified size.

Reimplemented from osgText::TextBase.

void osgText::Text3D::setBackStateSet ( osg::StateSet backStateSet) [inline]

Set the back StateSet.

void osgText::Text3D::setCharacterDepth ( float  characterDepth)

Set the Charactere Depth of text.

void osgText::Text3D::setRenderMode ( RenderMode  renderMode) [inline]

Set the render mode used to render the text.

virtual void osgText::Text3D::setThreadSafeRefUnref ( bool  threadSafe) [virtual]

Set whether to use a mutex to ensure ref() and unref() are thread safe.

Reimplemented from osgText::TextBase.

void osgText::Text3D::setWallStateSet ( osg::StateSet wallStateSet) [inline]

Set the wall StateSet.

virtual bool osgText::Text3D::supports ( const osg::Drawable::AttributeFunctor ) const [inline, virtual]

return false, osgText::Text does not support accept(AttributeFunctor&).

Reimplemented from osg::Drawable.

virtual bool osgText::Text3D::supports ( const osg::Drawable::ConstAttributeFunctor ) const [inline, virtual]

return true, osgText::Text does support accept(ConstAttributeFunctor&).

Reimplemented from osg::Drawable.

virtual bool osgText::Text3D::supports ( const osg::PrimitiveFunctor ) const [inline, virtual]

return true, osgText::Text does support accept(PrimitiveFunctor&) .

Reimplemented from osg::Drawable.


Friends And Related Function Documentation

friend class Font [friend]

Member Data Documentation


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

osg logo
Generated at Mon Oct 3 2011 12:39:49 for the OpenSceneGraph by doxygen 1.7.5.