Open Inventor Reference
|
Object you can scale uniformly in 3D by dragging with the mouse. More...
#include <Inventor/draggers/SoScaleUniformDragger.h>
Public Member Functions | |
SoScaleUniformDragger () | |
Constructors. | |
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 | ~SoScaleUniformDragger () |
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. |
SoScaleUniformDragger is a simple dragger that scales uniformly in all 3 dimensions when dragged with the mouse. The local space is 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/scaleUniformDragger.iv into your own directory, editing the file, and then setting the environment variable SO_DRAGGER_DIR to be a path to that directory.
ScaleUniformDragger { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO isActive FALSE scaleFactor 1 1 1 }
Definition at line 151 of file SoScaleUniformDragger.h.
SoScaleUniformDragger::SoScaleUniformDragger | ( | ) |
virtual SoScaleUniformDragger::~SoScaleUniformDragger | ( | ) | [protected, virtual] |
void SoScaleUniformDragger::drag | ( | ) | [protected] |
void SoScaleUniformDragger::dragFinish | ( | ) | [protected] |
void SoScaleUniformDragger::dragStart | ( | ) | [protected] |
static void SoScaleUniformDragger::fieldSensorCB | ( | void * | , |
SoSensor * | |||
) | [static, protected] |
Reimplemented from SoInteractionKit.
static void SoScaleUniformDragger::finishCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoScaleUniformDragger::initClass | ( | ) | [static] |
Reimplemented from SoDragger.
static void SoScaleUniformDragger::motionCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
virtual SbBool SoScaleUniformDragger::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 SoScaleUniformDragger::startCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
static void SoScaleUniformDragger::valueChangedCB | ( | void * | , |
SoDragger * | |||
) | [static, protected] |
SoFieldSensor* SoScaleUniformDragger::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 180 of file SoScaleUniformDragger.h.
SbLineProjector* SoScaleUniformDragger::lineProj [protected] |
Definition at line 174 of file SoScaleUniformDragger.h.
Definition at line 167 of file SoScaleUniformDragger.h.