SoTrackballDragger Class Reference
[Draggers]

Striped ball you can rotate or scale uniformly by dragging with the mouse. More...

#include <Inventor/draggers/SoTrackballDragger.h>

Inheritance diagram for SoTrackballDragger:
SoDragger SoInteractionKit SoBaseKit SoNode SoGetView SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
virtual const SoNodekitCataloggetNodekitCatalog () const
 SoTrackballDragger ()
SbBool isAnimationEnabled ()
void setAnimationEnabled (SbBool newVal)

Static Public Member Functions

static SoType getClassTypeId ()
static const SoNodekitCataloggetClassNodekitCatalog ()

Public Attributes

SoSFRotation rotation
SoSFVec3f scaleFactor

Detailed Description

Striped ball you can rotate or scale uniformly by dragging with the mouse.

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. This behavior may be disabled by setting the environment variable OIV_DISABLE_DRAGGER_CTRL_KEY to false (see SoPreferences).

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:

You can change the parts in any instance of this dragger using setPart(). 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 $OIVHOME/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.

This dragger has both a default and a WYSIWYG version:

Default Dragger WYSIWYG Dragger
SoTrackballDragger.png
SoTrackballDraggerWYSIWYG.png

See SoDragger for more information about using and customizing draggers, including code examples, using draggers in an immersive VR environment and using WYSIWYG draggers.

NOTES

FILE FORMAT/DEFAULT

DRAGGER RESOURCES

CATALOG PARTS

SEE ALSO

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


Constructor & Destructor Documentation

SoTrackballDragger::SoTrackballDragger (  ) 

Constructor.


Member Function Documentation

static const SoNodekitCatalog* SoTrackballDragger::getClassNodekitCatalog (  )  [static]

Returns the SoNodekitCatalog for this class.

Reimplemented from SoDragger.

static SoType SoTrackballDragger::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoDragger.

virtual const SoNodekitCatalog* SoTrackballDragger::getNodekitCatalog (  )  const [virtual]

Returns the SoNodekitCatalog for this instance.

Reimplemented from SoDragger.

virtual SoType SoTrackballDragger::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoDragger.

SbBool SoTrackballDragger::isAnimationEnabled (  )  [inline]

Returns whether spin animation is enabled.

void SoTrackballDragger::setAnimationEnabled ( SbBool  newVal  ) 

Enables/disables spin animation.

When spin animation is enabled, if the mouse is moving while you release it, the trackball will continue to spin afterwards. By default, spin animation is enabled.


Member Data Documentation

Orientation of the dragger.

Scale of the dragger.

Note: The dragger will always scale uniformly in all 3 dimensions, using the highest value in the scaleFactor field. E.g. (10, 1, 1) is equivalent to (10, 10, 10). This behavior is consistent with scaling the dragger in user interactions.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/