#include <X3DFontStyleNode.h>
Inheritance diagram for H3D::X3DFontStyleNode:

Public Types | |
| enum | Alignment { HORIZONTAL, VERTICAL } |
| Enumeration of the alignments allowed for text. | |
| enum | Justification { FIRST, BEGIN, MIDDLE, END } |
| Enumeration for the different justification values allowed. | |
Public Member Functions | |
| X3DFontStyleNode (Inst< SFNode > _metadata=0) | |
| Constructor. | |
| virtual void | buildFonts () |
| Build Character instances for all characters that will be allowed for use by this font node. | |
| bool | fontsBuilt () |
| Returns true if buildFonts has been called, false otherwise. | |
| virtual bool | isTopToBottom () |
| Returns true if the text should be rendered from top to bottom, false otherwise. | |
| virtual bool | isLeftToRight () |
| Returns true if the text should be rendered from left to right, false otherwise. | |
| virtual H3DFloat | getSpacing () |
| Returns the spacing between lines of text. | |
| virtual Alignment | getAlignment () |
| Gets the alignment of the text. | |
| virtual Justification | getMajorJustification () |
| Gets the justification of the text in the major alignment direction. | |
| virtual Justification | getMinorJustification () |
| Gets the justification of the text in the minor alignment direction. | |
| virtual void | renderChar (unsigned char c) |
| Render the given character with this font. | |
| virtual Vec3f | charDimensions (unsigned char c) |
| Get the dimensions in metres of the character given when rendered with this font. | |
| virtual H3DFloat | ascender () |
| Returns how many metres in the the positive y-direction from the origin the characters of this font use. | |
| virtual H3DFloat | descender () |
| Returns how many metres in the the negative y-direction from the origin the characters of this font use. | |
| Vec3f | stringDimensions (const string &text, Alignment alignment) |
| Given a text string and an alignment of the text the function returns the dimensions of the bounding box of the 3d representation of the text using this font. | |
| Vec3f | stringDimensions (const vector< string > &text, Alignment alignment, const vector< H3DFloat > &length=vector< H3DFloat >()) |
| Given a vector of text string and an alignment of the text the function returns the dimensions of the bounding box of the 3d representation of the text using this font. | |
| virtual string | defaultXMLContainerField () |
| Returns the default xml containerField attribute value. | |
Protected Attributes | |
| bool | fonts_built |
| True if buildFonts has been called. | |
|
|
Build Character instances for all characters that will be allowed for use by this font node. Characters are to be put into the characters vector using its own value as an index. Also buildFonts has to be set to true when defining this function. |
|
|
Returns the default xml containerField attribute value. For this node it is "fontStyle". Reimplemented from H3D::Node. |
|
|
Returns the spacing between lines of text. See FontStyle for more details. |
|
||||||||||||||||
|
Given a vector of text string and an alignment of the text the function returns the dimensions of the bounding box of the 3d representation of the text using this font. A vector specifying the length of the text fields as in the Text node. If this is specified this length will be used as length for as many strings in text as there are values in length. |
1.4.5