Open Inventor Reference
|
Object you can translate along a line by dragging With the mouse. More...
#include <Inventor/draggers/SoTranslate1Dragger.h>
Public Member Functions | |
SoTranslate1Dragger () | |
Constructor. | |
Static Public Member Functions | |
static void | initClass () |
initialize the class | |
Public Attributes | |
SoSFVec3f | translation |
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 | ~SoTranslate1Dragger () |
Static Protected Member Functions | |
static void | startCB (void *, SoDragger *) |
static void | motionCB (void *, SoDragger *) |
static void | finishCB (void *, SoDragger *) |
static void | fieldSensorCB (void *, SoSensor *) |
static void | valueChangedCB (void *, SoDragger *) |
Protected Attributes | |
SbLineProjector * | lineProj |
projector for linear scaling | |
SoFieldSensor * | fieldSensor |
This sensor will watch the topSeparator part. |
SoTranslate1Dragger is a simple dragger that translates in one dimension when dragged with the mouse. It moves along the x axis of its local space, 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 translation field which always reflects its position in local space. If you set the field, the dragger will move accordingly. You can also connect fields of other nodes or engines from this one to make them follow the dragger's motion.
This dragger contains four parts, translator, translatorActive, 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/translate1Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.
Translate1Dragger { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO isActive FALSE translation 0 0 0 }
Definition at line 152 of file SoTranslate1Dragger.h.
SoTranslate1Dragger::SoTranslate1Dragger | ( | ) |
virtual SoTranslate1Dragger::~SoTranslate1Dragger | ( | ) | [protected, virtual] |
void SoTranslate1Dragger::drag | ( | ) | [protected] |
void SoTranslate1Dragger::dragFinish | ( | ) | [protected] |
void SoTranslate1Dragger::dragStart | ( | ) | [protected] |
static void SoTranslate1Dragger::fieldSensorCB | ( | void * | , |
SoSensor * | |||
) | [static, protected] |
Reimplemented from SoInteractionKit.
static void SoTranslate1Dragger::finishCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoTranslate1Dragger::initClass | ( | ) | [static] |
Reimplemented from SoDragger.
static void SoTranslate1Dragger::motionCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
virtual SbBool SoTranslate1Dragger::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 SoTranslate1Dragger::startCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoTranslate1Dragger::valueChangedCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
SoFieldSensor* SoTranslate1Dragger::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 SoTranslate1Dragger.h.
SbLineProjector* SoTranslate1Dragger::lineProj [protected] |
Definition at line 175 of file SoTranslate1Dragger.h.
Definition at line 168 of file SoTranslate1Dragger.h.