1SoTrackballDragger(3IV)()                            SoTrackballDragger(3IV)()
2
3
4

NAME

6       SoTrackballDragger  — striped ball you can rotate or scale uniformly by
7       dragging with the mouse
8

INHERITS FROM

10       SoBase > SoFieldContainer > SoNode >  SoBaseKit  >  SoInteractionKit  >
11       SoDragger > SoTrackballDragger
12

SYNOPSIS

14       #include <Inventor/draggers/SoTrackballDragger.h>
15
16          Fields from class SoTrackballDragger:
17
18     SoSFVec3f           scaleFactor
19     SoSFRotation        rotation
20
21          Fields from class SoDragger:
22
23     SoSFBool            isActive
24
25          Fields from class SoInteractionKit:
26
27     SoSFEnum            renderCaching
28     SoSFEnum            boundingBoxCaching
29     SoSFEnum            renderCulling
30     SoSFEnum            pickCulling
31
32          Parts from class SoBaseKit:
33
34     (SoNodeKitListPart)  callbackList
35
36          Methods from class SoTrackballDragger:
37
38                         SoTrackballDragger()
39     SbBool              isAnimationEnabled()
40     void                setAnimationEnabled(SbBool newVal)
41     static const SoNodekitCatalog *
42                         getClassNodekitCatalog() const
43     static SoType       getClassTypeId()
44
45          Methods from class SoDragger:
46
47     void                addStartCallback(SoDraggerCB  *f,  void  *userData  =
48                              NULL)
49     void                removeStartCallback(SoDraggerCB *f, void *userData  =
50                              NULL)
51     void                addMotionCallback(SoDraggerCB  *f,  void  *userData =
52                              NULL)
53     void                removeMotionCallback(SoDraggerCB *f, void *userData =
54                              NULL)
55     void                addFinishCallback(SoDraggerCB  *f,  void  *userData =
56                              NULL)
57     void                removeFinishCallback(SoDraggerCB *f, void *userData =
58                              NULL)
59     void                addValueChangedCallback(SoDraggerCB  *f,  void *user‐
60                              Data = NULL)
61     void                removeValueChangedCallback(SoDraggerCB    *f,    void
62                              *userData = NULL)
63     SbBool              enableValueChangedCallbacks()
64     void                setMinGesture(int pixels)
65     int                 getMinGesture() const
66     static void         setMinScale(float newMinScale)
67     static float        getMinScale()
68
69          Methods from class SoInteractionKit:
70
71     virtual  SbBool      setPartAsPath(const SbName &partName, SoPath *surro‐
72                              gatePath )
73
74          Methods from class SoBaseKit:
75
76     virtual const SoNodekitCatalog *
77                              getNodekitCatalog() const
78     virtual   SoNode   *         getPart(const   SbName   &partName,   SbBool
79                                   makeIfNeeded)
80     SbString                 getPartString(const SoBase *part)
81     virtual  SoNodeKitPath *  createPathToPart(const SbName &partName, SbBool
82                                   makeIfNeeded, const SoPath *pathToExtend  =
83                                   NULL)
84     virtual SbBool           setPart(const SbName &partName, SoNode *newPart)
85     SbBool                   set(char *partName, char *parameters)
86     SbBool                   set(char *nameValuePairs)
87     static SbBool            isSearchingChildren()
88     static void              setSearchingChildren(SbBool newVal)
89
90          Methods from class SoNode:
91
92     void                setOverride(SbBool state)
93     SbBool              isOverride() const
94     SoNode *            copy(SbBool copyConnections = FALSE) const
95     virtual SbBool      affectsState() const
96     static SoNode *     getByName(const SbName &name)
97     static int          getByName(const SbName &name, SoNodeList &list)
98
99          Methods from class SoFieldContainer:
100
101     void                setToDefaults()
102     SbBool              hasDefaultValues() const
103     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
104     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
105                              copyConnections = FALSE)
106     void                get(SbString &fieldDataString)
107     virtual int         getFields(SoFieldList &resultList) const
108     virtual SoField *   getField(const SbName &fieldName) const
109     SbBool              getFieldName(const SoField *field, SbName &fieldName)
110                              const
111     SbBool              isNotifyEnabled() const
112     SbBool              enableNotify(SbBool flag)
113
114          Methods from class SoBase:
115
116     void                ref()
117     void                unref() const
118     void                unrefNoDelete() const
119     void                touch()
120     virtual SoType      getTypeId() const
121     SbBool              isOfType(SoType type) const
122     virtual void        setName(const SbName &name)
123     virtual SbName      getName() const
124
125          Macros from class SoBaseKit:
126
127     SO_GET_PART(kit, partName, partClass)
128     SO_CHECK_PART(kit, partName, partClass)
129
130

DESCRIPTION

132       SoTrackballDragger  is  a  ball  wrapped in three circular stripes. The
133       stripes are oriented like wheels that spin around the x, y, and z axes.
134       Drag  the stripes to rotate the trackball around those axes. You do not
135       have to hit the lines; pick anywhere within the  stripe's  outline.  To
136       rotate the trackball freely in 3 dimensions, click the area between the
137       stripes and then drag. An invisible but pickable sphere initiates  this
138       dragging.  If the mouse is still moving when you release it, the track‐
139       ball will continue to spin.
140
141       Press the <Control> key to scale the  trackball  uniformly  instead  of
142       rotating.
143
144       Press  the  <Shift>  key and the user axis appears; this is a draggable
145       axis with an extra stripe around it. Moving the mouse along the surface
146       of the sphere drags the 'pole' of the axis. Release the <Shift> key and
147       the user axis remains; drag the new  stripe  for  constrained  rotation
148       around  the  user  axis. To make the user axis disappear, press <Shift>
149       and drag the pole to where two of other stripes intersect. This  aligns
150       the  user axis with a primary axis, at which point the user axis disap‐
151       pears.
152
153       As you drag the trackball, it updates its rotation field, or its scale‐
154       Factor field if the <Control> key is down. As with all draggers, if you
155       change the fields the dragger moves in response.
156
157       Remember: This is not an  SoTransform!.  If  you  want  to  move  other
158       objects with this dragger, you can either:
159
160       [a]  Use an SoTrackballManip, which is subclassed from SoTransform. The
161       manipulator creates one of these draggers and uses it as the  interface
162       to  edit  the manipulator's fields. (see the SoTrackballManip reference
163       page).
164
165       [b] Use field-to-field connections to connect the fields of this  drag‐
166       ger to those of any SoTransformation node.
167
168       You  can  change  the  parts in any instance of this dragger using set‐
169       Part(). The default part geometries are defined as resources  for  this
170       SoTrackballDragger  class.  They  are detailed in the Dragger Resources
171       section of the online reference page for this class. You can make  your
172       program  use  different  default resources for the parts by copying the
173       file /usr/share/data/draggerDefaults/trackballDragger.iv into your  own
174       directory,  editing the file, and then setting the environment variable
175       SO_DRAGGER_DIR to be a path to that directory.
176

FIELDS

178     SoSFVec3f           scaleFactor
179          Scale of the dragger.
180
181     SoSFRotation        rotation
182          Orientation of the dragger.
183
184

METHODS

186                         SoTrackballDragger()
187          Constructor.
188
189     SbBool              isAnimationEnabled()
190     void                setAnimationEnabled(SbBool newVal)
191          If the mouse is moving while you release it, the trackball will con‐
192          tinue  to  spin  afterwards.  These  two  methods will query and set
193          whether this feature is turned on or off. By default, the  animation
194          feature is turned on.
195
196     static const SoNodekitCatalog *
197                         getClassNodekitCatalog() const
198          Returns an SoNodekitCatalog for this class
199
200     static SoType       getClassTypeId()
201          Returns type identifier for this class.
202
203

CATALOG PARTS

205       ┌─────────────────────────────────────────────────────────────┐
206All parts                           
207NULL by 
208Part Name           Part Type         Default Type   Default 
209       │                                                             │
210       │callbackList        NodeKitListPart   --               yes   │
211       │surroundScale       SurroundScale     --               yes   │
212       │antiSquish          AntiSquish        --               no    │
213       │rotator             Separator         --               yes   │
214       │rotatorActive       Separator         --               yes   │
215       │XRotator            Separator         --               yes   │
216       │XRotatorActive      Separator         --               yes   │
217       │YRotator            Separator         --               yes   │
218       │YRotatorActive      Separator         --               yes   │
219       │ZRotator            Separator         --               yes   │
220       │ZRotatorActive      Separator         --               yes   │
221       │userAxis            Separator         --               yes   │
222       │userAxisActive      Separator         --               yes   │
223       │userRotator         Separator         --               yes   │
224       │userRotatorActive   Separator         --               yes   │
225       │                                                             │
226       └─────────────────────────────────────────────────────────────┘
227       ┌───────────────────────────────────────────────────────────────┐
228Extra information for list parts from above table        
229       │                                                               │
230Part Name      Container Type   Permissible Types              
231       │                                                               │
232       │callbackList   Separator        Callback, EventCallback        │
233       │                                                               │
234       └───────────────────────────────────────────────────────────────┘

DRAGGER RESOURCES

236       .in 0n+.5i
237     Resource:         trackballRotator
238       .in 0n+.5i
239     Part:             rotator
240     Appearance:       Invisible but pickable sphere
241     Description:      Initiates  unconstrained  3D rotation. Slightly smaller
242                         radius than the stripes, so you must pick between the
243                         stripes to use it.
244
245                         .in 0n+.5i
246     Resource:         trackballRotatorActive
247                         .in 0n+.5i
248     Part:             rotatorActive
249     Appearance:       Invisible sphere
250     Description:      Displayed during unconstrained 3D rotation.
251
252                         .in 0n+.5i
253     Resource:         trackballXRotator
254                         .in 0n+.5i
255     Part:             XRotator
256     Appearance:       White outline of a stripe aligned with the X axis.
257     Description:      Pick  this to initiate constrained rotation about the X
258                         axis.
259
260                         .in 0n+.5i
261     Resource:         trackballXRotatorActive
262                         .in 0n+.5i
263     Part:             XRotatorActive
264     Appearance:       Yellow version of the regular XRotator
265     Description:      Displayed during constrained rotation about the X axis.
266
267                         .in 0n+.5i
268     Resource:         trackballYRotator
269                         .in 0n+.5i
270     Part:             YRotator
271     Appearance:       White outline of a stripe aligned with the Y axis.
272     Description:      Pick this to initiate constrained rotation about the  Y
273                         axis.
274
275                         .in 0n+.5i
276     Resource:         trackballYRotatorActive
277                         .in 0n+.5i
278     Part:             YRotatorActive
279     Appearance:       Yellow version of the regular YRotator
280     Description:      Displayed during constrained rotation about the Y axis.
281
282                         .in 0n+.5i
283     Resource:         trackballZRotator
284                         .in 0n+.5i
285     Part:             ZRotator
286     Appearance:       White outline of a stripe aligned with the Z axis.
287     Description:      Pick  this to initiate constrained rotation about the Z
288                         axis.
289
290                         .in 0n+.5i
291     Resource:         trackballZRotatorActive
292                         .in 0n+.5i
293     Part:             ZRotatorActive
294     Appearance:       Yellow version of the regular ZRotator
295     Description:      Displayed during constrained rotation about the Z axis.
296
297                         .in 0n+.5i
298     Resource:         trackballUserAxis
299                         .in 0n+.5i
300     Part:             userAxis
301     Appearance:       Thin purple line
302     Description:      Displays  the  user  axis.  Dragging  the   userRotator
303                         rotates about this line.
304
305                         .in 0n+.5i
306     Resource:         trackballUserAxisActive
307                         .in 0n+.5i
308     Part:             userAxisActive
309     Appearance:       Thin purple line
310     Description:      Displays   the  user  axis.  Dragging  the  userRotator
311                         rotates about this line.
312
313                         .in 0n+.5i
314     Resource:         trackballUserRotator
315                         .in 0n+.5i
316     Part:             userRotator
317     Appearance:       Transparent green stripe circling the user axis.
318     Description:      Pick to initiate constrained rotation  about  the  user
319                         axis.
320
321                         .in 0n+.5i
322     Resource:         trackballUserRotatorActive
323                         .in 0n+.5i
324     Part:             userRotatorActive
325     Appearance:       Brighter green version of the regular userRotator
326     Description:      Displayed  during  constrained  rotation about the user
327                         axis.
328
329

FILE FORMAT/DEFAULTS

331       TrackballDragger {
332          renderCaching       AUTO
333          boundingBoxCaching  AUTO
334          renderCulling       AUTO
335          pickCulling         AUTO
336          isActive            FALSE
337          rotation            0 0 1  0
338          scaleFactor         1 1 1
339          callbackList        NULL
340          surroundScale       NULL
341          antiSquish          AntiSquish {
342              sizing LONGEST_DIAGONAL }
343
344          rotator             <trackballRotator resource>
345          rotatorActive       <trackballRotatorActive resource>
346          XRotator            <trackballXRotator resource>
347          XRotatorActive      <trackballXRotatorActive resource>
348          YRotator            <trackballYRotator resource>
349          YRotatorActive      <trackballYRotatorActive resource>
350          ZRotator            <trackballZRotator resource>
351          ZRotatorActive      <trackballZRotatorActive resource>
352          userAxis            <trackballUserAxis resource>
353          userAxisActive      <trackballUserAxisActive resource>
354          userRotator         <trackballUserRotator resource>
355          userRotatorActive   <trackballUserRotatorActive resource>
356     }
357

NOTE

359       Unlike most multi-function draggers, SoTrackballDragger is not  a  com‐
360       pound dragger made up of other draggers that perform its smaller tasks.
361       This is not because it was inappropriate, but because the trackball was
362       written before implementation of the methods that take care of synchro‐
363       nizing multiple child draggers. The younger SoCenterballDragger is sim‐
364       ilar  in  form to the trackball, but the centerball is a compound drag‐
365       ger.
366

SEE ALSO

368       SoInteractionKit, SoDragger,  SoCenterballDragger,  SoDirectionalLight‐
369       Dragger,    SoDragPointDragger,    SoHandleBoxDragger,   SoJackDragger,
370       SoPointLightDragger,  SoRotateCylindricalDragger,  SoRotateDiscDragger,
371       SoRotateSphericalDragger,       SoScale1Dragger,       SoScale2Dragger,
372       SoScale2UniformDragger,   SoScaleUniformDragger,    SoSpotLightDragger,
373       SoTabBoxDragger,   SoTabPlaneDragger,  SoTransformBoxDragger,  SoTrans‐
374       formerDragger, SoTranslate1Dragger, SoTranslate2Dragger
375
376
377
378
379                                                     SoTrackballDragger(3IV)()
Impressum