1SoText3(3IV)() SoText3(3IV)()
2
3
4
6 SoText3 — 3D text shape node
7
9 SoBase > SoFieldContainer > SoNode > SoShape > SoText3
10
12 #include <Inventor/nodes/SoText3.h>
13
14 enum Justification {
15 SoText3::LEFT Left edges of all strings are aligned
16 SoText3::RIGHT Right edges of all strings are aligned
17 SoText3::CENTER Centers of all strings are aligned
18 }
19
20 enum Part {
21 SoText3::FRONT Front faces of characters
22 SoText3::SIDES Extruded sides of characters
23 SoText3::BACK Back faces of characters
24 SoText3::ALL All parts
25 }
26
27 Fields from class SoText3:
28
29 SoMFString string
30 SoSFFloat spacing
31 SoSFBitMask parts
32 SoSFEnum justification
33
34 Methods from class SoText3:
35
36 SoText3()
37 static SoType getClassTypeId()
38
39 Methods from class SoNode:
40
41 void setOverride(SbBool state)
42 SbBool isOverride() const
43 SoNode * copy(SbBool copyConnections = FALSE) const
44 virtual SbBool affectsState() const
45 static SoNode * getByName(const SbName &name)
46 static int getByName(const SbName &name, SoNodeList &list)
47
48 Methods from class SoFieldContainer:
49
50 void setToDefaults()
51 SbBool hasDefaultValues() const
52 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
53 void copyFieldValues(const SoFieldContainer *fc, SbBool
54 copyConnections = FALSE)
55 SbBool set(const char *fieldDataString)
56 void get(SbString &fieldDataString)
57 virtual int getFields(SoFieldList &resultList) const
58 virtual SoField * getField(const SbName &fieldName) const
59 SbBool getFieldName(const SoField *field, SbName &fieldName)
60 const
61 SbBool isNotifyEnabled() const
62 SbBool enableNotify(SbBool flag)
63
64 Methods from class SoBase:
65
66 void ref()
67 void unref() const
68 void unrefNoDelete() const
69 void touch()
70 virtual SoType getTypeId() const
71 SbBool isOfType(SoType type) const
72 virtual void setName(const SbName &name)
73 virtual SbName getName() const
74
75
77 This node defines one or more strings of 3D text. In contrast with
78 SoText2, 3D text can be rotated, scaled, lighted, and textured, just
79 like all other 3D shapes. Each character in a 3D text string is created
80 by extruding an outlined version of the character (in the current type‐
81 face) along the current profile, as defined by nodes derived from
82 SoProfile. The default text profile, if none is specified, is a
83 straight line segment one unit long.
84
85 The text origin is at (0,0,0) after applying the current transforma‐
86 tion. The scale of the text is affected by the size field of the cur‐
87 rent SoFont as well as the current transformation.
88
89 SoText3 uses the current set of materials when rendering. If the mate‐
90 rial binding is OVERALL, then the whole text is drawn with the first
91 material. If it is PER_PART or PER_PART_INDEXED, the front part of the
92 text is drawn with the first material, the sides with the second, and
93 the back with the third.
94
95 Textures are applied to 3D text as follows. On the front and back faces
96 of the text, the texture origin is at the base point of the first
97 string; the base point is at the lower left for justification LEFT, at
98 the lower right for RIGHT, and at the lower center for CENTER. The tex‐
99 ture is scaled equally in both S and T dimensions, with the font height
100 representing 1 unit. S increases to the right on the front faces and to
101 the left on the back faces. On the sides, the texture is scaled the
102 same as on the front and back. S is equal to 0 at the rear edge of the
103 side faces. The T origin can occur anywhere along each character,
104 depending on how that character's outline is defined.
105
107 SoMFString string
108 The text string(s) to display. Each string will appear on its own
109 line. The string(s) can be ascii or UTF-8.
110
111 SoSFFloat spacing
112 Defines the distance (in the negative y direction) between the base
113 points of successive strings, measured with respect to the current
114 font height. A value of 1 indicates single spacing, a value of 2
115 indicates double spacing, and so on.
116
117 SoSFBitMask parts
118 Which parts of text are visible. Note that, for speed, the default
119 for this field is FRONT only.
120
121 SoSFEnum justification
122 Indicates placement and alignment of strings. With LEFT justifica‐
123 tion, the left edge of the first line is at the (transformed) ori‐
124 gin, and all left edges are aligned. RIGHT justification is similar.
125 CENTER justification places the center of the first string at the
126 (transformed) origin, with the centers of all remaining strings
127 aligned under it.
128
129
131 SoText3()
132 Creates a 3D text node with default settings.
133
134 static SoType getClassTypeId()
135 Returns type identifier for this class.
136
137
139 SoGLRenderAction
140 Draws text based on the current font, profiles, transformation,
141 drawing style, material, texture, complexity, and so on.
142
143 SoRayPickAction
144 Performs a pick on the text. The string index and character position
145 are available from the SoTextDetail.
146
147 SoGetBoundingBoxAction
148 Computes the bounding box that encloses the text.
149
150 SoCallbackAction
151 If any triangle callbacks are registered with the action, they will
152 be invoked for each successive triangle used to approximate the text
153 geometry.
154
155
157 Text3 {
158 string ""
159 spacing 1
160 justification LEFT
161 parts FRONT
162 }
163
165 SoFont, SoProfile, SoText2, SoTextDetail
166
167
168
169
170 SoText3(3IV)()