| 1 |
NAME SoAsciiText "" "" { simple 3D text shape node } |
| 2 |
|
| 3 |
INCLUDE nodes/SoAsciiText.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This node defines one or more strings of 3D text. In contrast with |
| 7 |
\cSoText2\., 3D text can be rotated, scaled, lighted, and textured, |
| 8 |
just like all other 3D shapes. In constrast with |
| 9 |
\cSoText3\., this 3D ascii text cannot be extruded. |
| 10 |
\p |
| 11 |
The text origin is at (0,0,0) after applying the current |
| 12 |
transformation. The scale of the text is affected by the \vsize\. |
| 13 |
field of the current \cSoFont\. as well as the current transformation. |
| 14 |
\p |
| 15 |
\cSoAsciiText\. uses the current material when rendering. |
| 16 |
Textures are applied to ascii text as follows. On the front |
| 17 |
face of the text, the texture origin is at the base point of the |
| 18 |
first string; the base point is at the lower left for justification |
| 19 |
\kLEFT\., at the lower right for \kRIGHT\., and at the lower center |
| 20 |
for \kCENTER\.. The texture is scaled equally in both S and T |
| 21 |
dimensions, with the font height representing 1 unit. S increases to |
| 22 |
the right on the front face. |
| 23 |
} |
| 24 |
|
| 25 |
ENUM Justification { |
| 26 |
LEFT "Left edges of all strings are aligned", |
| 27 |
RIGHT "Right edges of all strings are aligned", |
| 28 |
CENTER "Centers of all strings are aligned" |
| 29 |
} |
| 30 |
|
| 31 |
FIELD string { |
| 32 |
The text string(s) to display. Each string will appear on its own line. |
| 33 |
} |
| 34 |
|
| 35 |
FIELD spacing { |
| 36 |
Defines the distance (in the negative y direction) between the base |
| 37 |
points of successive strings, measured with respect to the current |
| 38 |
font height. A value of 1 indicates single spacing, a value of 2 |
| 39 |
indicates double spacing, and so on. |
| 40 |
} |
| 41 |
|
| 42 |
FIELD justification { |
| 43 |
Indicates placement and alignment of strings. With \kLEFT\. |
| 44 |
justification, the left edge of the first line is at the (transformed) |
| 45 |
origin, and all left edges are aligned. \kRIGHT\. justification is |
| 46 |
similar. \kCENTER\. justification places the center of the first |
| 47 |
string at the (transformed) origin, with the centers of all remaining |
| 48 |
strings aligned under it. |
| 49 |
} |
| 50 |
|
| 51 |
FIELD width { |
| 52 |
Defines the width of each text string. Each string will be scaled so |
| 53 |
that it spans this many units. |
| 54 |
} |
| 55 |
|
| 56 |
METHOD "" SoAsciiText() { |
| 57 |
Creates an ascii text node with default settings. |
| 58 |
} |
| 59 |
|
| 60 |
METHOD "" static SoType getClassTypeId() { |
| 61 |
Returns type identifier for this class. |
| 62 |
} |
| 63 |
|
| 64 |
ACTION SoGLRenderAction { |
| 65 |
Draws text based on the current font, transformation, |
| 66 |
drawing style, material, texture, complexity, and so on. |
| 67 |
} |
| 68 |
|
| 69 |
ACTION SoRayPickAction { |
| 70 |
Performs a pick on the text. The string index and character position |
| 71 |
are available from the \cSoTextDetail\.. |
| 72 |
} |
| 73 |
|
| 74 |
ACTION SoGetBoundingBoxAction { |
| 75 |
Computes the bounding box that encloses the text. |
| 76 |
} |
| 77 |
|
| 78 |
ACTION SoCallbackAction { |
| 79 |
If any triangle callbacks are registered with the action, they will be |
| 80 |
invoked for each successive triangle used to approximate the text |
| 81 |
geometry. |
| 82 |
} |
| 83 |
|
| 84 |
ALSO { |
| 85 |
SoFont, |
| 86 |
SoFontStyle, |
| 87 |
SoText2, |
| 88 |
SoText3, |
| 89 |
SoTextDetail |
| 90 |
} |