Open Inventor Reference
|
Object you can rotate like a knob by dragging With the mouse. More...
#include <Inventor/draggers/SoRotateDiscDragger.h>
Public Member Functions | |
SoRotateDiscDragger () | |
Constructor. | |
Static Public Member Functions | |
static void | initClass () |
initialize the class | |
Public Attributes | |
SoSFRotation | rotation |
Protected Member Functions | |
void | dragStart () |
void | drag () |
void | dragFinish () |
virtual SbBool | setUpConnections (SbBool onOff, SbBool doItAlways=FALSE) |
detach/attach any sensors, callbacks, and/or field connections. | |
virtual | ~SoRotateDiscDragger () |
Static Protected Member Functions | |
static void | startCB (void *, SoDragger *) |
static void | motionCB (void *, SoDragger *) |
static void | doneCB (void *, SoDragger *) |
static void | fieldSensorCB (void *, SoSensor *) |
static void | valueChangedCB (void *, SoDragger *) |
Protected Attributes | |
SbPlaneProjector * | planeProj |
projector to use | |
SoFieldSensor * | fieldSensor |
This sensor will watch the topSeparator part. |
SoRotateDiscDragger is a simple dragger that rotates about the z axis of its local space. The feel of the rotation is as if you were spinning a record on a turntable or rotating the volume knob of a radio. The local space is determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the direction of motion.
This node has a rotation field which always reflects its orientation in local space. If you set the field, the dragger will rotate accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's rotation.
This dragger contains four parts, rotator, rotatorActive, feedback, and feedbackActive.
Each of these is set by default from a resource described in the Dragger Resources section of the online reference page for this class. You can change the parts in any instance of this dragger using setPart().
You can make your program use different default resources for the parts by copying the file /usr/share/data/draggerDefaults/rotateDiscDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.
RotateDiscDragger { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO isActive FALSE rotation 0 0 1 0 }
Definition at line 152 of file SoRotateDiscDragger.h.
SoRotateDiscDragger::SoRotateDiscDragger | ( | ) |
virtual SoRotateDiscDragger::~SoRotateDiscDragger | ( | ) | [protected, virtual] |
static void SoRotateDiscDragger::doneCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
void SoRotateDiscDragger::drag | ( | ) | [protected] |
void SoRotateDiscDragger::dragFinish | ( | ) | [protected] |
void SoRotateDiscDragger::dragStart | ( | ) | [protected] |
static void SoRotateDiscDragger::fieldSensorCB | ( | void * | , |
SoSensor * | |||
) | [static, protected] |
Reimplemented from SoInteractionKit.
static void SoRotateDiscDragger::initClass | ( | ) | [static] |
Reimplemented from SoDragger.
static void SoRotateDiscDragger::motionCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
virtual SbBool SoRotateDiscDragger::setUpConnections | ( | SbBool | onOff, |
SbBool | doItAlways = FALSE |
||
) | [protected, virtual] |
Called by: start/end of SoBaseKit::readInstance and on new copy by: start/end of SoBaseKit::copy. Classes that redefine must call setUpConnections(TRUE,TRUE) at end of constructor. Returns the state of the node when this was called.
Reimplemented from SoInteractionKit.
static void SoRotateDiscDragger::startCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoRotateDiscDragger::valueChangedCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
SoFieldSensor* SoRotateDiscDragger::fieldSensor [protected] |
If the part changes to a new node, then the fields of the old part will be disconnected and the fields of the new part will be connected. Connections are made from/to the renderCaching, boundingBoxCaching, renderCulling and pickCulling fields. This way, the SoInteractionKit can be treated from the outside just like a regular SoSeparator node. Setting the fields will affect caching and culling, even though the topSeparator takes care of it. oldTopSep keeps track of the part for comparison.
Reimplemented from SoInteractionKit.
Definition at line 181 of file SoRotateDiscDragger.h.
SbPlaneProjector* SoRotateDiscDragger::planeProj [protected] |
Definition at line 175 of file SoRotateDiscDragger.h.
Definition at line 168 of file SoRotateDiscDragger.h.