|
Public Types |
typedef std::map< osg::ref_ptr<
osg::StateSet >, GlyphQuads > | TextureGlyphQuadMap |
enum | CharacterSizeMode { OBJECT_COORDS,
SCREEN_COORDS,
OBJECT_COORDS_WITH_MAXIMUM_SCREEN_SIZE_CAPPED_BY_FONT_HEIGHT
} |
enum | AlignmentType {
LEFT_TOP,
LEFT_CENTER,
LEFT_BOTTOM,
CENTER_TOP,
CENTER_CENTER,
CENTER_BOTTOM,
RIGHT_TOP,
RIGHT_CENTER,
RIGHT_BOTTOM,
LEFT_BASE_LINE,
CENTER_BASE_LINE,
RIGHT_BASE_LINE,
BASE_LINE = LEFT_BASE_LINE
} |
enum | AxisAlignment {
XY_PLANE,
REVERSED_XY_PLANE,
XZ_PLANE,
REVERSED_XZ_PLANE,
YZ_PLANE,
REVERSED_YZ_PLANE,
SCREEN
} |
enum | Layout { LEFT_TO_RIGHT,
RIGHT_TO_LEFT,
VERTICAL
} |
enum | DrawModeMask { TEXT = 1,
BOUNDINGBOX = 2,
ALIGNMENT = 4
} |
Public Member Functions |
| Text () |
| Text (const Text &text, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) |
virtual osg::Object * | cloneType () const |
virtual osg::Object * | clone (const osg::CopyOp ©op) const |
virtual bool | isSameKindAs (const osg::Object *obj) const |
virtual const char * | className () const |
virtual const char * | libraryName () const |
void | setFont (Font *font=0) |
void | setFont (const std::string &fontfile) |
const Font * | getFont () const |
void | setFontResolution (unsigned int width, unsigned int height) |
unsigned int | getFontWidth () const |
unsigned int | getFontHeight () const |
void | setText (const String &text) |
void | setText (const std::string &text) |
void | setText (const std::string &text, String::Encoding encoding) |
void | setText (const wchar_t *text) |
String & | getText () |
const String & | getText () const |
void | update () |
void | setCharacterSize (float height, float aspectRatio=1.0f) |
float | getCharacterHeight () const |
float | getCharacterAspectRatio () const |
void | setCharacterSizeMode (CharacterSizeMode mode) |
CharacterSizeMode | getCharacterSizeMode () const |
void | setMaximumWidth (float maximumWidth) |
float | getMaximumWidth () const |
void | setMaximumHeight (float maximumHeight) |
float | getMaximumHeight () const |
void | setPosition (const osg::Vec3 &pos) |
const osg::Vec3 & | getPosition () const |
void | setAlignment (AlignmentType alignment) |
AlignmentType | getAlignment () const |
void | setAxisAlignment (AxisAlignment axis) |
void | setRotation (const osg::Quat &quat) |
const osg::Quat & | getRotation () const |
void | setAutoRotateToScreen (bool autoRotateToScreen) |
bool | getAutoRotateToScreen () const |
void | setLayout (Layout layout) |
Layout | getLayout () const |
void | setColor (const osg::Vec4 &color) |
const osg::Vec4 & | getColor () const |
void | setDrawMode (unsigned int mode) |
unsigned int | getDrawMode () const |
void | setKerningType (KerningType kerningType) |
KerningType | getKerningType () const |
virtual void | drawImplementation (osg::State &state) const |
virtual bool | supports (const osg::Drawable::AttributeFunctor &) const |
virtual bool | supports (const osg::Drawable::ConstAttributeFunctor &) const |
virtual void | accept (osg::Drawable::ConstAttributeFunctor &af) const |
virtual bool | supports (const osg::PrimitiveFunctor &) const |
virtual void | accept (osg::PrimitiveFunctor &pf) const |
virtual void | releaseGLObjects (osg::State *state=0) const |
const GlyphQuads * | getGlyphQuads (osg::StateSet *stateSet) const |
const TextureGlyphQuadMap & | getTextureGlyphQuadMap () const |
virtual osg::BoundingBox | computeBound () const |
Protected Member Functions |
virtual | ~Text () |
Font * | getActiveFont () |
const Font * | getActiveFont () const |
String::iterator | computeLastCharacterOnLine (osg::Vec2 cursor, String::iterator first, String::iterator last) |
void | computeGlyphRepresentation () |
void | computePositions () |
void | computePositions (unsigned int contextID) const |
Protected Attributes |
osg::ref_ptr< Font > | _font |
unsigned int | _fontWidth |
unsigned int | _fontHeight |
float | _characterHeight |
float | _characterAspectRatio |
CharacterSizeMode | _characterSizeMode |
float | _maximumWidth |
float | _maximumHeight |
String | _text |
osg::Vec3 | _position |
AlignmentType | _alignment |
osg::Quat | _rotation |
bool | _autoRotateToScreen |
Layout | _layout |
osg::Vec4 | _color |
unsigned int | _drawMode |
KerningType | _kerningType |
TextureGlyphQuadMap | _textureGlyphQuadMap |
osg::buffered_object< AutoTransformCache > | _autoTransformCache |
osg::Vec3 | _offset |
osg::Vec3 | _normal |
osg::BoundingBox | _textBB |
Friends |
class | Font |
Classes |
struct | AutoTransformCache |
struct | GlyphQuads |