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

Public Member Functions | |
| Text (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< SFFontStyleNode > _fontStyle=0, Inst< MFFloat > _length=0, Inst< SFFloat > _maxExtent=0, Inst< MFString > _string=0, Inst< SFBool > _solid=0) | |
| Constructor. | |
| virtual void | render () |
| Render the text with OpenGL. | |
Public Attributes | |
| auto_ptr< SFFontStyleNode > | fontStyle |
| The style the text should be rendered with. | |
| auto_ptr< MFFloat > | length |
| The length field contains an MFFloat value that specifies the length of each text string in the local coordinate system. | |
| auto_ptr< SFFloat > | maxExtent |
| The maxExtent field limits and compresses all of the text strings if the length of the maximum string is longer than the maximum extent, as measured in the local coordinate system. | |
| auto_ptr< MFString > | stringF |
| The strings to render. | |
| auto_ptr< SFBool > | solid |
| The solid field determines whether one or both sides of each polygon shall be displayed. | |
Static Public Attributes | |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
Protected Types | |
| typedef TypedSFNode< X3DFontStyleNode > | SFFontStyleNode |
Protected Member Functions | |
| virtual void | scaleToMaxExtent (const vector< string > &text, X3DFontStyleNode *font) |
| Scales the scene so that the text given would be contained within the value of the maxExtent field. | |
| virtual void | justifyMinor (const vector< string > &text, X3DFontStyleNode *font) |
| Justify the text in the minor alignment by translating it in the way described in the FontStyle node. | |
| virtual void | moveToNewLine (const string &text, X3DFontStyleNode *font) |
| Move to the position of the next line. | |
| virtual void | renderTextLine (const string &text, X3DFontStyleNode *font) |
| Render a line of text in the style of the X3DFontStyleNode given. | |
| virtual void | justifyLine (const string &text, X3DFontStyleNode *font) |
| Justify the line of text in the major alignment by translating it in the way described in the FontStyle node. | |
Classes | |
| class | DisplayList |
| We extend the DisplayList to build the fonts of the X3DFontStyleNode in the fontStyle field of the Text node this DisplayList resides in. More... | |
| class | SFBound |
| The SFBound field is specialized to update itself from the values in the fields of the Text node. More... | |
Text nodes may contain multiple text strings specified using the UTF-8 encoding. The text strings are stored in the order in which the text mode characters are to be produced as defined by the parameters in the FontStyle node.
The text strings are contained in the string field. The fontStyle field contains one FontStyle node that specifies the font size, font family and style, direction of the text strings, and any specific language rendering techniques used for the text.
The maxExtent field limits and compresses all of the text strings if the length of the maximum string is longer than the maximum extent, as measured in the local coordinate system. If the text string with the maximum length is shorter than the maxExtent, then there is no compressing. The maximum extent is measured horizontally for horizontal text (FontStyle node: horizontal=TRUE) and vertically for vertical text (FontStyle node: horizontal=FALSE). The maxExtent field shall be greater than or equal to zero.
The length field contains an MFFloat value that specifies the length of each text string in the local coordinate system. If the string is too short, it is stretched (either by scaling the text or by adding space between the characters). If the string is too long, it is compressed (either by scaling the text or by subtracting space between the characters). If a length value is missing (for example, if there are four strings but only three length values), the missing values are considered to be 0. The length field shall be greater than or equal to zero.
Specifying a value of 0 for both the maxExtent and length fields indicates that the string may be any length.
The solid field determines whether one or both sides of each polygon shall be displayed. If solid is FALSE, each polygon is visible regardless of the viewing direction and if it is TRUE back face culling is performed to only show the front face of the polygons.
|
||||||||||||
|
Move to the position of the next line. What the next line is depends on the values in the FontStyle node, i.e. if the text is horizontal, if it is top to bottom or the other way around, spacing etc. |
|
||||||||||||
|
Render a line of text in the style of the X3DFontStyleNode given. The OpenGL transform matrices will not be changed by the call. |
|
||||||||||||
|
Scales the scene so that the text given would be contained within the value of the maxExtent field. The length field is inspected as well as the dimensions of the text to determine what the scale should be. |
|
|
The style the text should be rendered with. See X3DFontStyleNode.
Access type: inputOutput
|
|
|
The length field contains an MFFloat value that specifies the length of each text string in the local coordinate system. If the string is too short, it is stretched (either by scaling the text or by adding space between the characters). If the string is too long, it is compressed (either by scaling the text or by subtracting space between the characters). If a length value is missing (for example, if there are four strings but only three length values), the missing values are considered to be 0. The length field shall be greater than or equal to zero.
Access type: inputOutput
|
|
|
The maxExtent field limits and compresses all of the text strings if the length of the maximum string is longer than the maximum extent, as measured in the local coordinate system. If the text string with the maximum length is shorter than the maxExtent, then there is no compressing. The maximum extent is measured horizontally for horizontal text (FontStyle node: horizontal=TRUE) and vertically for vertical text (FontStyle node: horizontal=FALSE). The maxExtent field shall be greater than or equal to zero.
Access type: inputOutput
|
|
|
The solid field determines whether one or both sides of each polygon shall be displayed. If solid is FALSE, each polygon is visible regardless of the viewing direction and if it is TRUE back face culling is performed to only show the front face of the polygons.
Access type: inputOutput |
|
|
The strings to render. Each string will be on its own line.
Access type: inputOutput
|
1.4.5