SoCenterballDragger Class Reference
[Draggers]

Striped ball you rotate and re-center by dragging with the mouse. More...

#include <Inventor/draggers/SoCenterballDragger.h>

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

List of all members.

Public Member Functions

virtual SoType getTypeId () const
virtual const SoNodekitCataloggetNodekitCatalog () const
 SoCenterballDragger ()

Static Public Member Functions

static SoType getClassTypeId ()
static const SoNodekitCataloggetClassNodekitCatalog ()

Public Attributes

SoSFRotation rotation
SoSFVec3f center

Detailed Description

Striped ball you rotate and re-center by dragging with the mouse.

SoCenterballDragger is a composite dragger. Its shape is a sphere defined by three intersecting circles. Where the circles intersect (at the ends of the x, y and z axes) there are sets of small green crosshairs. Dragging a pair of crosshairs translates the entire centerball within the plane of the crosshairs. The interface of the sphere and circles is just like SoTrackballDragger. Dragging a circle rotates about a constrained axis and dragging the areas between them rotates the sphere freely about the center. An invisible but pickable sphere initiates the free-rotation dragging.

When you drag the crosshairs, the center field is updated; there is no translation field. Dragging other parts of the centerball updates the rotation field. As with all draggers, if you change the fields the dragger moves in response.

The draggers used for the crosshair parts are SoTranslate2Draggers, so pressing the <Shift> key allows you to constrain motion to slide along either the local x axis or y axis of that crosshair. The direction is determined by your initial mouse gesture after pressing the key. Releasing the key removes the constraint.

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 SoCenterballDragger 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/centerballDragger.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
SoCenterballDragger.png
SoCenterballDraggerWYSIWYG.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.

FILE FORMAT/DEFAULT

DRAGGER RESOURCES

CATALOG PARTS

SEE ALSO

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


Constructor & Destructor Documentation

SoCenterballDragger::SoCenterballDragger (  ) 

Constructor.


Member Function Documentation

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

Returns the SoNodekitCatalog for this class.

Reimplemented from SoDragger.

static SoType SoCenterballDragger::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoDragger.

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

Returns the SoNodekitCatalog for this instance.

Reimplemented from SoDragger.

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

Returns the type identifier for this specific instance.

Reimplemented from SoDragger.


Member Data Documentation

Center of rotation and scale of the centerball dragger.

Orientation of the centerball dragger.


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/