1SoAsciiText(3IV)()                                          SoAsciiText(3IV)()
2
3
4

NAME

6       SoAsciiText — simple 3D text shape node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoShape > SoAsciiText
10

SYNOPSIS

12       #include <Inventor/nodes/SoAsciiText.h>
13
14     enum Justification {
15          SoAsciiText::LEFT    Left edges of all strings are aligned
16          SoAsciiText::RIGHT   Right edges of all strings are aligned
17          SoAsciiText::CENTER  Centers of all strings are aligned
18     }
19
20          Fields from class SoAsciiText:
21
22     SoMFString          string
23     SoSFFloat           spacing
24     SoSFEnum            justification
25     SoMFFloat           width
26
27          Methods from class SoAsciiText:
28
29                         SoAsciiText()
30     static SoType       getClassTypeId()
31
32          Methods from class SoNode:
33
34     void                setOverride(SbBool state)
35     SbBool              isOverride() const
36     SoNode *            copy(SbBool copyConnections = FALSE) const
37     virtual SbBool      affectsState() const
38     static SoNode *     getByName(const SbName &name)
39     static int          getByName(const SbName &name, SoNodeList &list)
40
41          Methods from class SoFieldContainer:
42
43     void                setToDefaults()
44     SbBool              hasDefaultValues() const
45     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
46     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
47                              copyConnections = FALSE)
48     SbBool              set(const char *fieldDataString)
49     void                get(SbString &fieldDataString)
50     virtual int         getFields(SoFieldList &resultList) const
51     virtual SoField *   getField(const SbName &fieldName) const
52     SbBool              getFieldName(const SoField *field, SbName &fieldName)
53                              const
54     SbBool              isNotifyEnabled() const
55     SbBool              enableNotify(SbBool flag)
56
57          Methods from class SoBase:
58
59     void                ref()
60     void                unref() const
61     void                unrefNoDelete() const
62     void                touch()
63     virtual SoType      getTypeId() const
64     SbBool              isOfType(SoType type) const
65     virtual void        setName(const SbName &name)
66     virtual SbName      getName() const
67
68

DESCRIPTION

70       This  node  defines  one  or  more strings of 3D text. In contrast with
71       SoText2, 3D text can be rotated, scaled, lighted,  and  textured,  just
72       like all other 3D shapes. In constrast with SoText3, this 3D ascii text
73       cannot be extruded.
74
75       The text origin is at (0,0,0) after applying  the  current  transforma‐
76       tion.  The  scale of the text is affected by the size field of the cur‐
77       rent SoFont as well as the current transformation.
78
79       SoAsciiText uses the current  material  when  rendering.  Textures  are
80       applied  to  ascii  text as follows. On the front face of the text, the
81       texture origin is at the base point of the first string; the base point
82       is  at  the  lower  left for justification LEFT, at the lower right for
83       RIGHT, and at the lower  center  for  CENTER.  The  texture  is  scaled
84       equally in both S and T dimensions, with the font height representing 1
85       unit. S increases to the right on the front face.
86

FIELDS

88     SoMFString          string
89          The text string(s) to display. Each string will appear  on  its  own
90          line.
91
92     SoSFFloat           spacing
93          Defines  the distance (in the negative y direction) between the base
94          points of successive strings, measured with respect to  the  current
95          font  height.  A  value  of 1 indicates single spacing, a value of 2
96          indicates double spacing, and so on.
97
98     SoSFEnum            justification
99          Indicates placement and alignment of strings. With  LEFT  justifica‐
100          tion,  the  left edge of the first line is at the (transformed) ori‐
101          gin, and all left edges are aligned. RIGHT justification is similar.
102          CENTER  justification  places  the center of the first string at the
103          (transformed) origin, with the  centers  of  all  remaining  strings
104          aligned under it.
105
106     SoMFFloat           width
107          Defines the width of each text string. Each string will be scaled so
108          that it spans this many units.
109
110

METHODS

112                         SoAsciiText()
113          Creates an ascii text node with default settings.
114
115     static SoType       getClassTypeId()
116          Returns type identifier for this class.
117
118

ACTION BEHAVIOR

120       SoGLRenderAction
121          Draws text based on the current font, transformation, drawing style,
122          material, texture, complexity, and so on.
123
124     SoRayPickAction
125          Performs a pick on the text. The string index and character position
126          are available from the SoTextDetail.
127
128     SoGetBoundingBoxAction
129          Computes the bounding box that encloses the text.
130
131     SoCallbackAction
132          If any triangle callbacks are registered with the action, they  will
133          be invoked for each successive triangle used to approximate the text
134          geometry.
135
136

FILE FORMAT/DEFAULTS

138       AsciiText {
139          string         ""
140          spacing        1
141          justification  LEFT
142          width          0
143     }
144

SEE ALSO

146       SoFont, SoFontStyle, SoText2, SoText3, SoTextDetail
147
148
149
150
151                                                            SoAsciiText(3IV)()
Impressum