Open Inventor Reference
|
Object you can scale in two dimensions by dragging with the mouse. More...
#include <Inventor/draggers/SoScale2Dragger.h>
Public Member Functions | |
SoScale2Dragger () | |
Constructor. | |
Static Public Member Functions | |
static void | initClass () |
initialize the class | |
Public Attributes | |
SoSFVec3f | scaleFactor |
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 | ~SoScale2Dragger () |
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 | |
SbPlaneProjector * | planeProj |
projector for planar scaling | |
SoFieldSensor * | fieldSensor |
This sensor will watch the topSeparator part. |
SoScale2Dragger is a simple dragger that scales freely and independently in two dimensions when dragged with the mouse. It moves within the x-y plane of its local space, as determined by its location in the scene graph. Transformation nodes placed before it will affect both the dragger and the plane of motion.
This node has a scaleFactor field which always reflects its size in local space. If you set the field, the dragger will change 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, scaler, scalerActive, 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/scale2Dragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.
Scale2Dragger { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO isActive FALSE scaleFactor 1 1 1 }
Definition at line 152 of file SoScale2Dragger.h.
SoScale2Dragger::SoScale2Dragger | ( | ) |
virtual SoScale2Dragger::~SoScale2Dragger | ( | ) | [protected, virtual] |
void SoScale2Dragger::drag | ( | ) | [protected] |
void SoScale2Dragger::dragFinish | ( | ) | [protected] |
void SoScale2Dragger::dragStart | ( | ) | [protected] |
static void SoScale2Dragger::fieldSensorCB | ( | void * | , |
SoSensor * | |||
) | [static, protected] |
Reimplemented from SoInteractionKit.
static void SoScale2Dragger::finishCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoScale2Dragger::initClass | ( | ) | [static] |
Reimplemented from SoDragger.
static void SoScale2Dragger::motionCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
virtual SbBool SoScale2Dragger::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 SoScale2Dragger::startCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoScale2Dragger::valueChangedCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
SoFieldSensor* SoScale2Dragger::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 SoScale2Dragger.h.
SbPlaneProjector* SoScale2Dragger::planeProj [protected] |
Definition at line 175 of file SoScale2Dragger.h.
Definition at line 168 of file SoScale2Dragger.h.