osgText::Font3D Class Reference

Inheritance diagram for osgText::Font3D:
osg::Object osg::Referenced

List of all members.

Classes

class  Font3DImplementation
class  Glyph3D

Public Types

typedef OpenThreads::Mutex Font3DMutex

Public Member Functions

 Font3D (Font3DImplementation *implementation=0)
virtual osg::ObjectcloneType () const
virtual osg::Objectclone (const osg::CopyOp &) const
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const char * className () const
virtual const char * libraryName () const
virtual std::string getFileName () const
unsigned int getFontWidth () const
unsigned int getFontHeight () const
unsigned int getFontDepth () const
virtual osg::Vec2 getKerning (unsigned int leftcharcode, unsigned int rightcharcode, KerningType kerningType)
virtual Glyph3DgetGlyph (unsigned int charcode)
virtual bool hasVertical () const
virtual float getScale () const
void setImplementation (Font3DImplementation *implementation)
Font3DImplementationgetImplementation ()
const Font3DImplementationgetImplementation () const
virtual void setThreadSafeRefUnref (bool threadSafe)

Protected Types

typedef std::map< char,
osg::ref_ptr< Glyph3D > > 
Glyph3DMap

Protected Member Functions

virtual ~Font3D ()
void addGlyph (unsigned int charcode, Glyph3D *glyph)

Protected Attributes

unsigned int _depth
unsigned int _width
unsigned int _height
Glyph3DMap _glyph3DMap
osg::ref_ptr
< Font3DImplementation
_implementation

Friends

class Font3DImplementation

Detailed Description

Pure virtual base class for fonts. Concrete implementation are the DefaultFont found in src/osgText/DefaultFont.cpp and FreeTypeFont found in src/osgPlugins/freetype/FreeTypeFont.cpp


Member Typedef Documentation

typedef std::map<char, osg::ref_ptr<Glyph3D> > osgText::Font3D::Glyph3DMap [protected]

Constructor & Destructor Documentation

osgText::Font3D::Font3D ( Font3DImplementation implementation = 0  ) 
virtual osgText::Font3D::~Font3D (  )  [protected, virtual]

Member Function Documentation

void osgText::Font3D::addGlyph ( unsigned int  charcode,
Glyph3D glyph 
) [protected]
virtual const char* osgText::Font3D::className (  )  const [inline, virtual]

return the name of the object's class type. Must be defined by derived classes.

Implements osg::Object.

virtual osg::Object* osgText::Font3D::clone ( const osg::CopyOp  )  const [inline, virtual]

Clone an object, with Object* return type. Must be defined by derived classes.

Implements osg::Object.

virtual osg::Object* osgText::Font3D::cloneType (  )  const [inline, virtual]

Clone the type of an object, with Object* return type. Must be defined by derived classes.

Implements osg::Object.

virtual std::string osgText::Font3D::getFileName (  )  const [virtual]
unsigned int osgText::Font3D::getFontDepth (  )  const [inline]
unsigned int osgText::Font3D::getFontHeight (  )  const [inline]
unsigned int osgText::Font3D::getFontWidth (  )  const [inline]
virtual Glyph3D* osgText::Font3D::getGlyph ( unsigned int  charcode  )  [virtual]

Get a Glyph for specified charcode, and the font size nearest to the current font size hint.

const Font3DImplementation* osgText::Font3D::getImplementation (  )  const
Font3DImplementation* osgText::Font3D::getImplementation (  ) 
virtual osg::Vec2 osgText::Font3D::getKerning ( unsigned int  leftcharcode,
unsigned int  rightcharcode,
KerningType  kerningType 
) [virtual]

Get a kerning (adjustment of spacing of two adjacent character) for specified charcodes, w.r.t the current font size hint.

virtual float osgText::Font3D::getScale (  )  const [inline, virtual]

Return the scale to apply on the glyph to have a charactere size equal to 1

virtual bool osgText::Font3D::hasVertical (  )  const [virtual]

Return true if this font provides vertical alignments and spacing or glyphs.

virtual bool osgText::Font3D::isSameKindAs ( const osg::Object obj  )  const [inline, virtual]

Reimplemented from osg::Object.

References NULL.

virtual const char* osgText::Font3D::libraryName (  )  const [inline, virtual]

return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Implements osg::Object.

void osgText::Font3D::setImplementation ( Font3DImplementation implementation  ) 
virtual void osgText::Font3D::setThreadSafeRefUnref ( bool  threadSafe  )  [virtual]

Set whether to use a mutex to ensure ref() and unref()

Reimplemented from osg::Referenced.


Friends And Related Function Documentation

friend class Font3DImplementation [friend]

Member Data Documentation

unsigned int osgText::Font3D::_depth [protected]
unsigned int osgText::Font3D::_height [protected]
unsigned int osgText::Font3D::_width [protected]

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

Generated by  doxygen 1.6.2