1SoCenterballDragger(3IV)()                          SoCenterballDragger(3IV)()
2
3
4

NAME

6       SoCenterballDragger — striped ball you rotate and re-center by dragging
7       with the mouse
8

INHERITS FROM

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

SYNOPSIS

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

DESCRIPTION

130       SoCenterballDragger  is  a  composite  dragger.  Its  shape is a sphere
131       defined by three intersecting circles. Where the circles intersect  (at
132       the  ends  of  the  x,  y  and  z  axes)  there are sets of small green
133       crosshairs. Dragging a pair of crosshairs translates the entire center‐
134       ball  within  the  plane of the crosshairs. The interface of the sphere
135       and circles is just like SoTrackballDragger. Dragging a circle  rotates
136       about  a  constrained  axis and dragging the areas between them rotates
137       the sphere freely about the center. An invisible  but  pickable  sphere
138       initiates the free-rotation dragging.
139
140       When  you drag the crosshairs, the center field is updated; there is no
141       translation field. Dragging other parts of the centerball  updates  the
142       rotation  field.  As  with  all  draggers, if you change the fields the
143       dragger moves in response.
144
145       The draggers used for the crosshair parts are SoTranslate2Draggers,  so
146       pressing  the <Shift> key allows you to constrain motion to slide along
147       either the local x axis or y axis of that crosshair.. The direction  is
148       determined  by  your  initial  mouse  gesture  after  pressing the key.
149       Releasing the key removes the constraint.
150
151       Remember: This is not an SoTransform! If you want to move other objects
152       with this dragger, you can either:
153
154       [a] Use an SoCenterballManip, which is subclassed from SoTransform. The
155       manipulator creates one of these draggers and uses it as the  interface
156       to edit the manipulator's fields. (See the SoCenterballManip man page.)
157
158       [b]  Use field-to-field connections to connect the fields of this drag‐
159       ger to those of any SoTransformation node.
160
161       You can change the parts in any instance of  this  dragger  using  set‐
162       Part().  The  default part geometries are defined as resources for this
163       SoCenterballDragger class. They are detailed in the  Dragger  Resources
164       section  of the online reference page for this class. You can make your
165       program use different default resources for the parts  by  copying  the
166       file /usr/share/data/draggerDefaults/centerballDragger.iv into your own
167       directory, editing the file, and then setting the environment  variable
168       SO_DRAGGER_DIR to be a path to that directory.
169

FIELDS

171     SoSFRotation        rotation
172          Orientation of the centerball dragger.
173
174     SoSFVec3f           center
175          Center of rotation and scale of the centerball dragger.
176
177

METHODS

179                         SoCenterballDragger()
180          Constructor.
181
182     static const SoNodekitCatalog *
183                         getClassNodekitCatalog() const
184          Returns an SoNodekitCatalog for this class.
185
186     static SoType       getClassTypeId()
187          Returns type identifier for this class.
188
189

CATALOG PARTS

191       ┌──────────────────────────────────────────────────────────────────────┐
192All parts                               
193NULL by 
194Part Name           Part Type                  Default Type   Default 
195       │                                                                      │
196       │callbackList        NodeKitListPart            --               yes   │
197       │translateToCenter   MatrixTransform            --               yes   │
198       │surroundScale       SurroundScale              --               yes   │
199       │antiSquish          AntiSquish                 --               no    │
200       │lightModel          LightModel                 --               yes   │
201       │XAxis               Separator                  --               yes   │
202       │YAxis               Separator                  --               yes   │
203       │ZAxis               Separator                  --               yes   │
204       │rotator             RotateSphericalDragger     --               yes   │
205       │YRotator            RotateCylindricalDragger   --               yes   │
206       │ZCenterChanger      Translate2Dragger          --               yes   │
207       │ZRotator            RotateCylindricalDragger   --               yes   │
208       │YCenterChanger      Translate2Dragger          --               yes   │
209       │XCenterChanger      Translate2Dragger          --               yes   │
210       │XRotator            RotateCylindricalDragger   --               yes   │
211       │                                                                      │
212       └──────────────────────────────────────────────────────────────────────┘
213       ┌───────────────────────────────────────────────────────────────┐
214Extra information for list parts from above table        
215       │                                                               │
216Part Name      Container Type   Permissible Types              
217       │                                                               │
218       │callbackList   Separator        Callback, EventCallback        │
219       │                                                               │
220       └───────────────────────────────────────────────────────────────┘

DRAGGER RESOURCES

222       .in 0n+.5i
223     Resource:         centerballRotator
224       .in 0n+.5i
225     Part:             rotator.rotator
226     Appearance:       Invisible but pickable sphere
227     Description:      When  picked,  initiates free rotation about the center
228                         point. Slightly smaller radius than the  stripes,  so
229                         you must pick between the stripes to use it.
230
231                         .in 0n+.5i
232     Resource:         centerballRotatorActive
233                         .in 0n+.5i
234     Part:             rotator.rotatorActive
235     Appearance:       Invisible sphere
236     Description:      Displayed  during  unconstrained 3D rotation instead of
237                         centerballRotator.
238
239                         .in 0n+.5i
240     Resource:         centerballStripe
241                         .in 0n+.5i
242     Parts:            XRotator.rotator
243                                           YRotator.rotator
244                                           ZRotator.rotator
245     Appearance:       White circle aligned with rotation axis.
246     Description:      When picked, initiates constrained rotation. Each rota‐
247                         tor  rotates locally about its Y axis. The centerball
248                         contains private  transform  parts  that  orient  the
249                         draggers along three different axes.
250
251                         .in 0n+.5i
252     Resource:         centerballStripeActive
253                         .in 0n+.5i
254     Parts:            XRotator.rotatorActive
255                                           YRotator.rotatorActive
256                                           ZRotator.rotatorActive
257     Appearance:       White circle aligned with the rotation axis.
258     Description:      Displayed  during  constrained  rotation instead of the
259                         rotator part. The  centerball  orients  the  draggers
260                         along three different axes.
261
262                         .in 0n+.5i
263     Resource:         centerballCenterChanger
264                         .in 0n+.5i
265     Parts:            XCenterChanger.translator
266                                           YCenterChanger.translator
267                                           ZCenterChanger.translator
268     Appearance:       Two sets of small green crosshairs, one located at each
269     intersection of axis and ball.
270     Description:      When picked, initiates 2D translation of  ball  through
271                         space.  Edits  the center field, which becomes center
272                         for  subsequent  rotations.  Each  translator   works
273                         locally  in  its  X-Y  plane. The centerball contains
274                         private transform parts that place the draggers along
275                         three different axes.
276
277                         .in 0n+.5i
278     Resource:         centerballCenterChangerActive
279                         .in 0n+.5i
280     Parts:            XCenterChanger.translatorActive
281                                           YCenterChanger.translatorActive
282                                           ZCenterChanger.translatorActive
283     Appearance:       Yellow version of centerballCenterChanger.
284     Description:      Displayed  during  2D  translation  instead  of regular
285                         translator part. The centerball places  the  draggers
286                         along three different axes.
287
288                         .in 0n+.5i
289     Resource:         centerballCenterXAxisFeedback
290                         .in 0n+.5i
291     Parts:            XCenterChanger.xAxisFeedback
292                                           YCenterChanger.xAxisFeedback
293                                           ZCenterChanger.xAxisFeedback
294     Appearance:       Double-headed purple arrows, one located at each inter‐
295     section of axis and ball. Located atop X axis of crosshair.
296     Description:      Only shown if dragger is moving and the axis is a  per‐
297                         mitted  direction  of  motion. When pressing <shift>,
298                         motion is constrained, and this is displayed only  if
299                         the primary motion is in the X direction of the child
300                         dragger's local  space.  The  centerball  places  the
301                         draggers  along  three  different axes; so not all of
302                         these parts aligns with  the  X  axis  in  centerball
303                         space.
304
305                         .in 0n+.5i
306     Resource:         centerballCenterYAxisFeedback
307                         .in 0n+.5i
308     Parts:            XCenterChanger.yAxisFeedback
309                                           YCenterChanger.yAxisFeedback
310                                           ZCenterChanger.yAxisFeedback
311     Appearance:       Double-headed purple arrows, one located at each inter‐
312     section of axis and ball. Located atop Y axis of crosshair.
313     Description:      Only shown if dragger is moving and the axis is a  per‐
314                         mitted  direction  of  motion. When pressing <shift>,
315                         motion is constrained, and this is displayed only  if
316                         the primary motion is in the Y direction of the child
317                         dragger's local  space.  The  centerball  places  the
318                         draggers  along  three  different axes; so not all of
319                         these parts aligns with  the  Y  axis  in  centerball
320                         space.
321
322                         .in 0n+.5i
323     Resource:         centerballXAxis
324                         .in 0n+.5i
325     Part:             XAxis
326     Appearance:       Thin yellow line connecting left and right crosshairs.
327     Description:      Feedback shown alone during rotation about X axis; dis‐
328                         played with centerballYAxis and centerballZAxis while
329                         center is dragged.
330
331                         .in 0n+.5i
332     Resource:         centerballYAxis
333                         .in 0n+.5i
334     Part:             YAxis
335     Appearance:       Thin yellow line connecting lower and upper crosshairs.
336     Description:      Feedback shown alone during rotation about Y axis; dis‐
337                         played with centerballXAxis and centerballZAxis while
338                         center is dragged.
339
340                         .in 0n+.5i
341     Resource:         centerballZAxis
342                         .in 0n+.5i
343     Part:             ZAxis
344     Appearance:       Thin yellow line connecting near and far crosshairs.
345     Description:      Feedback shown alone during rotation about Z axis; dis‐
346                         played with centerballXAxis and centerballYAxis while
347                         center is dragged.
348
349

FILE FORMAT/DEFAULTS

351       CenterballDragger {
352          renderCaching                    AUTO
353          boundingBoxCaching               AUTO
354          renderCulling                    AUTO
355          pickCulling                      AUTO
356          isActive                         FALSE
357          rotation                         0 0 1  0
358          center                           0 0 0
359          callbackList                     NULL
360          translateToCenter                MatrixTransform {
361              matrix 1 0 0 0
362                                               0 1 0 0
363                                               0 0 1 0
364                                               0 0 0 1 }
365
366          surroundScale                    NULL
367          antiSquish                       AntiSquish {
368              sizing LONGEST_DIAGONAL }
369
370          lightModel                       LightModel {
371              model PHONG }
372
373          XAxis                            <centerballXAxis resource>
374          YAxis                            <centerballYAxis resource>
375          ZAxis                            <centerballZAxis resource>
376          rotator                          RotateSphericalDragger {
377          }
378
379          YRotator                         RotateCylindricalDragger {
380          }
381
382          ZCenterChanger                   Translate2Dragger {
383          }
384
385          ZRotator                         RotateCylindricalDragger {
386          }
387
388          YCenterChanger                   Translate2Dragger {
389          }
390
391          XCenterChanger                   Translate2Dragger {
392          }
393
394          XRotator                         RotateCylindricalDragger {
395          }
396
397          rotator.rotator                  <centerballRotator resource>
398          rotator.rotatorActive            <centerballRotatorActive resource>
399          XRotator.rotator                 <centerballStripe resource>
400          YRotator.rotator                 <centerballStripe resource>
401          ZRotator.rotator                 <centerballStripe resource>
402          XRotator.rotatorActive           <centerballStripeActive resource>
403          YRotator.rotatorActive           <centerballStripeActive resource>
404          ZRotator.rotatorActive           <centerballStripeActive resource>
405          XCenterChanger.translator        <centerballCenterChanger resource>
406          YCenterChanger.translator        <centerballCenterChanger resource>
407          ZCenterChanger.translator        <centerballCenterChanger resource>
408          XCenterChanger.translatorActive  <centerballCenterChangerActive resource>
409          YCenterChanger.translatorActive  <centerballCenterChangerActive resource>
410          ZCenterChanger.translatorActive  <centerballCenterChangerActive resource>
411          XCenterChanger.xAxisFeedback     <centerballCenterXAxisFeedback resource>
412          YCenterChanger.xAxisFeedback     <centerballCenterXAxisFeedback resource>
413          ZCenterChanger.xAxisFeedback     <centerballCenterXAxisFeedback resource>
414          XCenterChanger.yAxisFeedback     <centerballCenterYAxisFeedback resource>
415          YCenterChanger.yAxisFeedback     <centerballCenterYAxisFeedback resource>
416          ZCenterChanger.yAxisFeedback     <centerballCenterYAxisFeedback resource>
417     }
418

SEE ALSO

420       SoInteractionKit,  SoDragger,  SoDirectionalLightDragger,  SoDragPoint‐
421       Dragger, SoHandleBoxDragger, SoJackDragger, SoPointLightDragger,  SoRo‐
422       tateCylindricalDragger,  SoRotateDiscDragger, SoRotateSphericalDragger,
423       SoScale1Dragger, SoScale2Dragger,  SoScale2UniformDragger,  SoScaleUni‐
424       formDragger,  SoSpotLightDragger,  SoTabBoxDragger,  SoTabPlaneDragger,
425       SoTrackballDragger,     SoTransformBoxDragger,     SoTranslate1Dragger,
426       SoTranslate2Dragger
427
428
429
430
431                                                    SoCenterballDragger(3IV)()
Impressum