1SoTransformManip(3IV)()                                SoTransformManip(3IV)()
2
3
4

NAME

6       SoTransformManip  — base class for all transform Nodes with built-in 3D
7       user interfaces
8

INHERITS FROM

10       SoBase > SoFieldContainer > SoNode > SoTransformation >  SoTransform  >
11       SoTransformManip
12

SYNOPSIS

14       #include <Inventor/manips/SoTransformManip.h>
15
16          Fields from class SoTransform:
17
18     SoSFVec3f           translation
19     SoSFRotation        rotation
20     SoSFVec3f           scaleFactor
21     SoSFRotation        scaleOrientation
22     SoSFVec3f           center
23
24          Methods from class SoTransformManip:
25
26                         SoTransformManip()
27     SoDragger *         getDragger()
28     SbBool              replaceNode(SoPath *p )
29     SbBool              replaceManip(SoPath *p, SoTransform *newOne ) const
30     static SoType       getClassTypeId()
31
32          Methods from class SoTransform:
33
34     void                pointAt(const   SbVec3f   &fromPoint,  const  SbVec3f
35                              &toPoint)
36     void                getScaleSpaceMatrix(SbMatrix  &mat,  SbMatrix   &inv)
37                              const
38     void                getRotationSpaceMatrix(SbMatrix  &mat, SbMatrix &inv)
39                              const
40     void                getTranslationSpaceMatrix(SbMatrix   &mat,   SbMatrix
41                              &inv) const
42     void                multLeft(const SbMatrix &mat)
43     void                multRight(const SbMatrix &mat)
44     void                combineLeft(SoTransformation *nodeOnRight)
45     void                combineRight(SoTransformation *nodeOnLeft)
46     void                setMatrix(const SbMatrix &mat)
47     void                recenter(const SbVec3f &newCenter)
48
49          Methods from class SoNode:
50
51     void                setOverride(SbBool state)
52     SbBool              isOverride() const
53     SoNode *            copy(SbBool copyConnections = FALSE) const
54     virtual SbBool      affectsState() const
55     static SoNode *     getByName(const SbName &name)
56     static int          getByName(const SbName &name, SoNodeList &list)
57
58          Methods from class SoFieldContainer:
59
60     void                setToDefaults()
61     SbBool              hasDefaultValues() const
62     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
63     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
64                              copyConnections = FALSE)
65     SbBool              set(const char *fieldDataString)
66     void                get(SbString &fieldDataString)
67     virtual int         getFields(SoFieldList &resultList) const
68     virtual SoField *   getField(const SbName &fieldName) const
69     SbBool              getFieldName(const SoField *field, SbName &fieldName)
70                              const
71     SbBool              isNotifyEnabled() const
72     SbBool              enableNotify(SbBool flag)
73
74          Methods from class SoBase:
75
76     void                ref()
77     void                unref() const
78     void                unrefNoDelete() const
79     void                touch()
80     virtual SoType      getTypeId() const
81     SbBool              isOfType(SoType type) const
82     virtual void        setName(const SbName &name)
83     virtual SbName      getName() const
84
85

DESCRIPTION

87       SoTransformManip  is the base class for all SoTransform nodes that have
88       a built-in 3D user interface. Since it is derived from SoTransform, any
89       changes  to its fields result in the rotation, scaling, and/or transla‐
90       tion of nodes that follow it in the scene graph.
91
92       Typically, you will want to  replace  a  regular  SoTransform  with  an
93       SoTransformManip  (as  when the user selects an object to be moved), or
94       vice versa (as when the object is deselected, and the motion  interface
95       should  go away). Use the replaceNode() method  to insert a manipulator
96       into a scene graph, and the replaceManip() method  to  remove  it  when
97       done.
98
99       Every  subclass  of SoTransformManip utilizes a dragger of some sort to
100       provide a 3D interface. (This class does not have dragger; but all  the
101       subclasses do.) However a manipulator differs from a dragger; it influ‐
102       ences other objects in the scene because, as an SoTransform, it  alters
103       the  state.  The  fields values and movement of a dragger, on the other
104       hand, affect only the dragger itself.
105
106       Each SoTransformManip subclass utilizes its dragger by adding it  as  a
107       hidden  child.  When  an  action is applied to the manipulator, such as
108       rendering or handling events, the manipulator first traverses the drag‐
109       ger,  and  then  the  manipulator adds its transformation matrix to the
110       state. When you click-drag-release  over  the  manipulator,  it  passes
111       these  events  down  to  the dragger, which moves as a result ("I can't
112       help it, I'm a dragger!").
113
114       The manipulator maintains consistency between the fields of the dragger
115       and  its own fields. Let's say you use the mouse to rotate the dragger.
116       Callbacks insure that the rotation field of the manipulator will change
117       by  the same amount, resulting in the rotation of nodes which follow in
118       the scene graph. Similarly, if you  set  any  of  the  SoTransformManip
119       fields  the  manipulator will move the dragger accordingly. You can use
120       this feature to impose contraints on a manipulator: If the  user  moves
121       the  manipulator  so  that a field value becomes too large, you can set
122       the field back to your desired maximum, and the whole thing  will  move
123       back to where you specified.
124
125       Since  each  SoTransformManip  uses a dragger to provide its interface,
126       you will generally be told to look at the dragger's reference page  for
127       details  of  how  it  moves  and  what the different parts are for. The
128       interface for the dragger and the manipulator will  always  be  exactly
129       the same. Usually, a SoTransformManip will surround the objects that it
130       influences (i.e., those that move along with it). This is  because  the
131       manipulator  turns  on  the  surroundScale  part of its dragger; so the
132       dragger geometry expands to envelope the other objects (see the  refer‐
133       ence page for SoSurroundScale).
134
135       Because  the  dragger  is  a  hidden  child, you can see the dragger on
136       screen and interact with it, but the dragger does not show up when  you
137       write the manipulator to file. Also, any SoPath will end at the manipu‐
138       lator. (See the Actions section of this reference page for  a  complete
139       description of when the dragger is traversed).
140
141       If  you  want  to  get a pointer to the dragger you can get it from the
142       manipulator using the getDragger() method. You will need to do this  if
143       you  want  to  change the geometry of a manipulator, since the geometry
144       actually belongs to the dragger.
145

METHODS

147                         SoTransformManip()
148          Constructor.
149
150     SoDragger *         getDragger()
151          Returns a pointer to the dragger being  used  by  this  manipulator.
152          Given  this  pointer,  you  can  customize the dragger just like you
153          would any other dragger. You can change geometry using the setPart()
154          method,  or  add  callbacks using the methods found in the SoDragger
155          reference page.
156
157     SbBool              replaceNode(SoPath *p )
158          Replaces the tail of the path with this manipulator. The tail of the
159          path  must be an SoTransform node (or subclass thereof). If the path
160          has a nodekit, this will try to use setPart() to insert the  manipu‐
161          lator.  Otherwise,  the  manipulator  requires that the next to last
162          node in the path chain be a group.
163
164          The field values from the transform node  will  be  copied  to  this
165          manipulator, and the transform will be replaced.
166
167          The manipulator will not call ref() on the node it is replacing. The
168          old node will disappear if it has no references other than from  the
169          input  path p and its parent, since this manipulator will be replac‐
170          ing it in both of those places. Nor will the  manipulator  make  any
171          changes to field connections of the old node. The calling process is
172          thus responsible for keeping track of its own nodes and  field  con‐
173          nections.
174
175     SbBool              replaceManip(SoPath *p, SoTransform *newOne ) const
176          Replaces  the tail of the path, which must be this manipulator, with
177          the given SoTransform node. If the path has a nodekit, this will try
178          to  use setPart() to insert the new node. Otherwise, the manipulator
179          requires that the next to last node in the path chain be a group.
180
181          The field values from the manipulator will be copied to  the  trans‐
182          form node, and the manipulator will be replaced.
183
184          The manipulator will not call ref() or unref()  on the node which is
185          replacing it, nor will it make any changes to field connections. The
186          calling  process  is  thus  responsible for keeping track of its own
187          nodes and field connections.
188
189     static SoType       getClassTypeId()
190          Returns type identifier for this class.
191
192

ACTION BEHAVIOR

194       SoGLRenderAction,  SoCallbackAction,  SoGetBoundingBoxAction,  SoGetMa‐
195       trixAction, SoHandleEventAction, SoRayPickAction
196          First,  traverses the dragger the way an SoGroup would. All draggers
197          place themselves in space,  but  leave  the  current  transformation
198          unchanged  when  finished.  Then  the SoTransformManip accumulates a
199          transformation into the current transformation just  like  its  base
200          class, SoTransform.
201
202     SoSearchAction
203          Searches  just  like  an  SoTransform.  Does not search the dragger,
204          which is a hidden child.
205
206     SoWriteAction
207          Writes out just like an SoTransform. Does  not  write  the  dragger,
208          which is a hidden child. If you really need to write valuable infor‐
209          mation about the dragger,  such  as  customized  geometry,  you  can
210          retrieve  the dragger with the getDragger() method and then write it
211          out separately.
212
213

FILE FORMAT/DEFAULTS

215       TransformManip {
216          translation       0 0 0
217          rotation          0 0 1  0
218          scaleFactor       1 1 1
219          scaleOrientation  0 0 1  0
220          center            0 0 0
221     }
222

SEE ALSO

224       SoDragger, SoTransform, SoCenterballManip, SoHandleBoxManip,  SoJackMa‐
225       nip,  SoSurroundScale, SoTabBoxManip, SoTrackballManip, SoTransformBox‐
226       Manip, SoTransformerManip
227
228
229
230
231                                                       SoTransformManip(3IV)()
Impressum