SoTrackballDragger(3IV)

SoTrackballDragger (SoTballDrag) - striped ball you can rotate or scale uniformly by dragging with the mouse

Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.22.

NAME
     SoTrackballDragger (SoTballDrag) - striped ball you can rotate or scale
     uniformly by dragging with the mouse

INHERITS FROM
     SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit >
     SoDragger > SoTrackballDragger

SYNOPSIS
     #include <Inventor_c/draggers/SoTrackballDragger.h>

     typedef SoTrackballDragger  SoTballDrag

          Fields from class SoTrackballDragger:

     SoSFVec3f           scaleFactor
     SoSFRotation        rotation

          Fields from class SoDragger:

     SoSFBool            isActive

          Fields from class SoInteractionKit:

     SoSFEnum            renderCaching
     SoSFEnum            boundingBoxCaching
     SoSFEnum            renderCulling
     SoSFEnum            pickCulling

          Parts from class SoBaseKit:

     (SoNodeKitListPart)  callbackList

          Functions from class SoTrackballDragger:

     SoTrackballDragger *      SoTballDragCreate()
     SbBool                    SoTballDragIsAnimEnabled(SoTballDrag *this)
     void                      SoTballDragSetAnimEnabled(SoTballDrag *this,
                                    SbBool newVal)
     const SoNodekitCatalog *  SoTballDragGetClassNkitCat()
     SoType                    SoTballDragGetClassTypeId()

          Functions from class SoDragger:

     void                SoTballDragAddStartCB(SoTballDrag *this, SoDraggerCB
                              *f, void *userData = NULL)
     void                SoTballDragRemoveStartCB(SoTballDrag *this,
                              SoDraggerCB *f, void *userData = NULL)
     void                SoTballDragAddMotionCB(SoTballDrag *this, SoDraggerCB
                              *f, void *userData = NULL)
     void                SoTballDragRemoveMotionCB(SoTballDrag *this,
                              SoDraggerCB *f, void *userData = NULL)
     void                SoTballDragAddFinishCB(SoTballDrag *this, SoDraggerCB
                              *f, void *userData = NULL)
     void                SoTballDragRemoveFinishCB(SoTballDrag *this,
                              SoDraggerCB *f, void *userData = NULL)
     void                SoTballDragAddValueChangedCB(SoTballDrag *this,
                              SoDraggerCB *f, void *userData = NULL)
     void                SoTballDragRemoveValueChangedCB(SoTballDrag *this,
                              SoDraggerCB *f, void *userData = NULL)
     SbBool              SoTballDragEnableValueChangedCBs(SoTballDrag *this)
     void                SoTballDragSetMinGesture(SoTballDrag *this, int
                              pixels)
     int                 SoTballDragGetMinGesture(const SoTballDrag *this)
     void                SoTballDragSetMinScale(float newMinScale)
     float               SoTballDragGetMinScale()

          Functions from class SoInteractionKit:

     SbBool              SoTballDragSetPartAsPath(SoTballDrag *this, const
                              char *partName, SoPath *surrogatePath )

          Functions from class SoBaseKit:

     const SoNodekitCatalog *  SoTballDragGetCat(const SoTballDrag *this)
     SoNode *                  SoTballDragGetPart(SoTballDrag *this, const
                                    char *partName, SbBool makeIfNeeded)
     SbString                  SoTballDragGetPartString(SoTballDrag *this,
                                    const SoBase *part)
     SoNodeKitPath *           SoTballDragCreatePathToPart(SoTballDrag *this,
                                    const char *partName, SbBool makeIfNeeded,
                                    const SoPath *pathToExtend = NULL)
     SbBool                    SoTballDragSetPart(SoTballDrag *this, const
                                    char *partName, SoNode *newPart)
     SbBool                    SoTballDragSet(SoTballDrag *this, char
                                    *partName, char *parameters)
     SbBool                    SoTballDragSet2(SoTballDrag *this, char
                                    *nameValuePairs)
     SbBool                    SoTballDragIsSearchingChildren()
     void                      SoTballDragSetSearchingChildren(SbBool newVal)

          Functions from class SoNode:

     void                SoTballDragSetOverride(SoTballDrag *this, SbBool
                              state)
     SbBool              SoTballDragIsOverride(const SoTballDrag *this)
     SoNode *            SoTballDragCopy(const SoTballDrag *this, SbBool
                              copyConnections = FALSE)
     SbBool              SoTballDragAffectsState(const SoTballDrag *this)
     SoNode *            SoTballDragGetByName(const char *name)
     int                 SoTballDragGetByNameList(const char *name, SoNodeList
                              *list)

          Functions from class SoFieldContainer:
     void                SoTballDragSetToDflts(SoTballDrag *this)
     SbBool              SoTballDragHasDfltVals(const SoTballDrag *this)
     SbBool              SoTballDragFldsAreEq(const SoTballDrag *this, const
                              SoFieldContainer *fc)
     void                SoTballDragCopyFieldVals(SoTballDrag *this, const
                              SoFieldContainer *fc, SbBool copyConnections =
                              FALSE)
     void                SoTballDragGet(SoTballDrag *this, SbString
                              *fieldDataString)
     int                 SoTballDragGetFields(const SoTballDrag *this,
                              SoFieldList *resultList)
     SoField *           SoTballDragGetField(const SoTballDrag *this, const
                              char *fieldName)
     SbBool              SoTballDragGetFieldName(const SoTballDrag *this,
                              const SoField *field, SbName *fieldName)
     SbBool              SoTballDragIsNotifyEnabled(const SoTballDrag *this)
     SbBool              SoTballDragEnableNotify(SoTballDrag *this, SbBool
                              flag)

          Functions from class SoBase:

     void                SoTballDragRef(SoTballDrag *this)
     void                SoTballDragUnref(const SoTballDrag *this)
     void                SoTballDragUnrefNoDelete(const SoTballDrag *this)
     void                SoTballDragTouch(SoTballDrag *this)
     SoType              SoTballDragGetTypeId(const SoTballDrag *this)
     SbBool              SoTballDragIsOfType(const SoTballDrag *this, SoType
                              type)
     void                SoTballDragSetName(SoTballDrag *this, const char
                              *name)
     SbName              SoTballDragGetName(const SoTballDrag *this)


DESCRIPTION
     SoTrackballDragger is a ball wrapped in three circular stripes. The
     stripes are oriented like wheels that spin around the x, y, and z axes.
     Drag the stripes to rotate the trackball around those axes. You do not
     have to hit the lines; pick anywhere within the stripe's outline. To
     rotate the trackball freely in 3 dimensions, click the area between the
     stripes and then drag. An invisible but pickable sphere initiates this
     dragging. If the mouse is still moving when you release it, the trackball
     will continue to spin.

     Press the <Control> key to scale the trackball uniformly instead of
     rotating.

     Press the <Shift> key and the user axis appears; this is a draggable axis
     with an extra stripe around it. Moving the mouse along the surface of the
     sphere drags the 'pole' of the axis. Release the <Shift> key and the user
     axis remains; drag the new stripe for constrained rotation around the
     user axis. To make the user axis disappear, press <Shift> and drag the
     pole to where two of other stripes intersect. This aligns the user axis
     with a primary axis, at which point the user axis disappears.

     As you drag the trackball, it updates its rotation field, or its
     scaleFactor field if the <Control> key is down. As with all draggers, if
     you change the fields the dragger moves in response.

     Remember: This is not an SoTransform!. If you want to move other objects
     with this dragger, you can either:

     [a] Use an SoTrackballManip, which is subclassed from SoTransform. The
     manipulator creates one of these draggers and uses it as the interface to
     edit the manipulator's fields. (see the SoTrackballManip reference page).

     [b] Use field-to-field connections to connect the fields of this dragger
     to those of any SoTransformation node.

     You can change the parts in any instance of this dragger using
     SoDraggerSetPart(). The default part geometries are defined as resources
     for this SoTrackballDragger class. They are detailed in the Dragger
     Resources section of the online reference page for this class. You can
     make your program use different default resources for the parts by
     copying the file /usr/share/data/draggerDefaults/trackballDragger.iv into
     your own directory, editing the file, and then setting the environment
     variable SO_DRAGGER_DIR to be a path to that directory.

FIELDS
     SoSFVec3f           scaleFactor
          Scale of the dragger.

     SoSFRotation        rotation
          Orientation of the dragger.


FUNCTIONS
     SoTrackballDragger *      SoTballDragCreate()
          Constructor.

     SbBool                    SoTballDragIsAnimEnabled(SoTballDrag *this)
     void                      SoTballDragSetAnimEnabled(SoTballDrag *this,
                                    SbBool newVal)
          If the mouse is moving while you release it, the trackball will
          continue to spin afterwards. These two methods will query and set
          whether this feature is turned on or off. By default, the animation
          feature is turned on.

     const SoNodekitCatalog *  SoTballDragGetClassNkitCat()
          Returns an SoNodekitCatalog for this class

     SoType                    SoTballDragGetClassTypeId()
          Returns type identifier for this class.

CATALOG PARTS
     ______________________________________________________________
                               All parts
                                                           NULL by
      Part Name           Part Type         Default Type   Default

      callbackList        NodeKitListPart   --               yes
      surroundScale       SurroundScale     --               yes
      antiSquish          AntiSquish        --               no
      rotator             Separator         --               yes
      rotatorActive       Separator         --               yes
      XRotator            Separator         --               yes
      XRotatorActive      Separator         --               yes
      YRotator            Separator         --               yes
      YRotatorActive      Separator         --               yes
      ZRotator            Separator         --               yes
      ZRotatorActive      Separator         --               yes
      userAxis            Separator         --               yes
      userAxisActive      Separator         --               yes
      userRotator         Separator         --               yes
      userRotatorActive   Separator         --               yes

     ______________________________________________________________
     |


















                                                                   |



















     ________________________________________________________________
            Extra information for list parts from above table

      Part Name      Container Type   Permissible Types

                                      Callback, EventCallback
      callbackList   Separator

     ________________________________________________________________
     |




                                                                     |






DRAGGER RESOURCES
     Resource:         trackballRotator
     Part:             rotator
     Appearance:       Invisible but pickable sphere
     Description:      Initiates unconstrained 3D rotation. Slightly smaller
                         radius than the stripes, so you must pick between the
                         stripes to use it.

     Resource:         trackballRotatorActive
     Part:             rotatorActive
     Appearance:       Invisible sphere
     Description:      Displayed during unconstrained 3D rotation.

     Resource:         trackballXRotator
     Part:             XRotator
     Appearance:       White outline of a stripe aligned with the X axis.
     Description:      Pick this to initiate constrained rotation about the X
                         axis.

     Resource:         trackballXRotatorActive
     Part:             XRotatorActive
     Appearance:       Yellow version of the regular XRotator
     Description:      Displayed during constrained rotation about the X axis.

     Resource:         trackballYRotator
     Part:             YRotator
     Appearance:       White outline of a stripe aligned with the Y axis.
     Description:      Pick this to initiate constrained rotation about the Y
                         axis.

     Resource:         trackballYRotatorActive
     Part:             YRotatorActive
     Appearance:       Yellow version of the regular YRotator
     Description:      Displayed during constrained rotation about the Y axis.

     Resource:         trackballZRotator
     Part:             ZRotator
     Appearance:       White outline of a stripe aligned with the Z axis.
     Description:      Pick this to initiate constrained rotation about the Z
                         axis.

     Resource:         trackballZRotatorActive
     Part:             ZRotatorActive
     Appearance:       Yellow version of the regular ZRotator
     Description:      Displayed during constrained rotation about the Z axis.

     Resource:         trackballUserAxis
     Part:             userAxis
     Appearance:       Thin purple line
     Description:      Displays the user axis. Dragging the userRotator
                         rotates about this line.

     Resource:         trackballUserAxisActive
     Part:             userAxisActive
     Appearance:       Thin purple line
     Description:      Displays the user axis. Dragging the userRotator
                         rotates about this line.

     Resource:         trackballUserRotator
     Part:             userRotator
     Appearance:       Transparent green stripe circling the user axis.
     Description:      Pick to initiate constrained rotation about the user
                         axis.

     Resource:         trackballUserRotatorActive
     Part:             userRotatorActive
     Appearance:       Brighter green version of the regular userRotator
     Description:      Displayed during constrained rotation about the user
                         axis.


FILE FORMAT/DEFAULTS
     TrackballDragger {
          renderCaching       AUTO
          boundingBoxCaching  AUTO
          renderCulling       AUTO
          pickCulling         AUTO
          isActive            FALSE
          rotation            0 0 1  0
          scaleFactor         1 1 1
          callbackList        NULL
          surroundScale       NULL
          antiSquish          AntiSquish {
              sizing LONGEST_DIAGONAL }

          rotator             <trackballRotator resource>
          rotatorActive       <trackballRotatorActive resource>
          XRotator            <trackballXRotator resource>
          XRotatorActive      <trackballXRotatorActive resource>
          YRotator            <trackballYRotator resource>
          YRotatorActive      <trackballYRotatorActive resource>
          ZRotator            <trackballZRotator resource>
          ZRotatorActive      <trackballZRotatorActive resource>
          userAxis            <trackballUserAxis resource>
          userAxisActive      <trackballUserAxisActive resource>
          userRotator         <trackballUserRotator resource>
          userRotatorActive   <trackballUserRotatorActive resource>
     }

NOTE
     Unlike most multi-function draggers, SoTrackballDragger is not a compound
     dragger made up of other draggers that perform its smaller tasks. This is
     not because it was inappropriate, but because the trackball was written
     before implementation of the methods that take care of synchronizing
     multiple child draggers. The younger SoCenterballDragger is similar in
     form to the trackball, but the centerball is a compound dragger.

SEE ALSO
     SoInteractionKit, SoDragger, SoCenterballDragger,
     SoDirectionalLightDragger, SoDragPointDragger, SoHandleBoxDragger,
     SoJackDragger, SoPointLightDragger, SoRotateCylindricalDragger,
     SoRotateDiscDragger, SoRotateSphericalDragger, SoScale1Dragger,
     SoScale2Dragger, SoScale2UniformDragger, SoScaleUniformDragger,
     SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger,
     SoTransformBoxDragger, SoTransformerDragger, SoTranslate1Dragger,
     SoTranslate2Dragger