#include <Inventor/draggers/SoTransformerDragger.h>
Inheritance diagram for SoTransformerDragger::
Public Types | |
enum | State { INACTIVE, RIT_X_ROTATE, TOP_Y_ROTATE, FNT_Z_ROTATE, LFT_X_ROTATE, BOT_Y_ROTATE, BAK_Z_ROTATE, PX_PY_PZ_3D_SCALE, PX_PY_NZ_3D_SCALE, PX_NY_PZ_3D_SCALE, PX_NY_NZ_3D_SCALE, NX_PY_PZ_3D_SCALE, NX_PY_NZ_3D_SCALE, NX_NY_PZ_3D_SCALE, NX_NY_NZ_3D_SCALE, RIT_TRANSLATE, TOP_TRANSLATE, FNT_TRANSLATE, LFT_TRANSLATE, BOT_TRANSLATE, BAK_TRANSLATE } |
Public Methods | |
SoTransformerDragger (void) | |
State | getCurrentState (void) |
void | unsquishKnobs (void) |
SbBool | isLocateHighlighting (void) |
void | setLocateHighlighting (SbBool onoff) |
SbVec3f | getBoxPointInWorldSpace (const SbVec3f &pointonunitbox) |
SbVec3f | getBoxDirInWorldSpace (const SbVec3f &dironunitbox) |
SbVec3f | getWorldPointInBoxSpace (const SbVec3f &pointinworldspace) |
SbVec2f | getWorldPointInPixelSpace (const SbVec3f &thepoint) |
SbVec3f | getInteractiveCenterInBoxSpace (void) |
Static Public Methods | |
void | initClass (void) |
void | setColinearThreshold (int newval) |
int | getColinearThreshold (void) |
Public Attributes | |
SoSFRotation | rotation |
SoSFVec3f | translation |
SoSFVec3f | scaleFactor |
SoSFFloat | minDiscRotDot |
Protected Methods | |
~SoTransformerDragger () | |
virtual SbBool | setUpConnections (SbBool onoff, SbBool doitalways=FALSE) |
virtual void | setDefaultOnNonWritingFields (void) |
void | dragStart (void) |
void | drag (void) |
void | dragFinish (void) |
void | updateAntiSquishList (void) |
void | setAllPartSwitches (int scalewhich, int rotatewhich, int translatewhich) |
int | getMouseGestureDirection (SbBool x_ok, SbBool y_ok, SbBool z_ok) |
Static Protected Methods | |
void | startCB (void *f, SoDragger *d) |
void | motionCB (void *f, SoDragger *d) |
void | finishCB (void *f, SoDragger *d) |
void | metaKeyChangeCB (void *, SoDragger *) |
void | fieldSensorCB (void *f, SoSensor *s) |
void | valueChangedCB (void *f, SoDragger *d) |
int | getIgnoreAxis (SbVec2f axis[3][2], SbBool x_ok, SbBool y_ok, SbBool z_ok) |
void | makeMinorAxisPerpendicularIfColinear (SbVec2f origin, SbVec2f axisends[3][2], int index_a, int index_b) |
SbBool | isColinear (SbVec2f a1[2], SbVec2f a2[2], int pixels) |
Protected Attributes | |
SoFieldSensor * | translFieldSensor |
SoFieldSensor * | scaleFieldSensor |
SoFieldSensor * | rotateFieldSensor |
SoNodeList | antiSquishList |
Translate the dragger by clicking and dragging any of the (invisible) sides. Translation will default be done in the plane of the side the end-user selected. The user can hold down a SHIFT
key to lock translation to a single of the axes in the plane. By holding down a CTRL
key instead, translation can be done along the plane's normal vector.
Scaling is done by dragging the corner cubes. By default, uniform scaling will be done. Hold down SHIFT
before selecting any of the corners to do non-uniform scaling. Uniform scaling towards a corner-point can be accomplished by holding down CTRL
before clicking and dragging one of the cubes.
Rotation is done by dragging any of the 6 end-markers of the axis cross. The initial drag direction decides which orientation the rotation will be done in. Hold down SHIFT
to do free-form rotation around the sphere instead.
This is a big and complex dragger which needs a fair amount of proper documentation when provided in end-user applications. If what you are trying to accomplish in your application does not really demand most of the features of this dragger, you are advised to investigate whether or not any of the less complex draggers can fulfill your requirements -- so you can provide an as simple as possible user interface to your end-users.
For the application programmer's convenience, the Coin library also provides a manipulator class called SoTransformBoxManip, which wraps the SoTransformBoxDragger into the necessary mechanisms for making direct insertion of this dragger into a scenegraph possible with very little effort.
|
The various possible states the dragger might be in at any given time. That is: either SoTransformerDragger::INACTIVE if there's no interaction, or any of the other values to indicate what operation the end-user is currently executing. |
|
Default constructor, sets up the dragger nodekit catalog with the interaction and feedback geometry. |
|
Protected destructor. (Dragger classes are derived from SoBase, so they are reference counted and automatically destroyed when their reference count goes to 0.) |
|
Initializes type system for this dragger class. Application programmers should usually not have to invoke this method, see documentation of SoInteraction::initClass(). Reimplemented from SoDragger. |
|
Returns an indicator for the current operation executed on the dragger by the end-user -- or SoTransformerDragger::INACTIVE if none. |
|
Sets up all internal connections for instances of this class. (This method will usually not be of interest to the application programmer, unless you want to extend the library with new custom nodekits or dragger classes. If so, see the SoBaseKit class documentation.) Reimplemented from SoInteractionKit. |
|
(Be aware that this method is unlikely to be of interest to the application programmer who does not want to extend the library with new custom nodekits or draggers. If you indeed are writing extensions, see the information in the SoBaseKit class documentation.)
A virtual method that should call SoField::setDefault() with argument This is typically done when:
Reimplemented from SoDragger. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. Reimplemented from SoInteractionKit. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. |
|
Not implemented in Coin; should probably not have been public in the Open Inventor API. We'll consider to implement it if requested. |
|
Not implemented in Coin; should probably not have been public in the Open Inventor API. We'll consider to implement it if requested. |
|
Not implemented in Coin; should probably not have been public in the Open Inventor API. We'll consider to implement it if requested. |
|
Not implemented in Coin; should probably not have been public in the Open Inventor API. We'll consider to implement it if requested. |
|
This field is continuously updated to contain the orientation of the dragger. |
|
The dragger's offset position from the local origo. |
|
Continuously updated to contain the current vector of scaling along the X, Y and Z axes. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. |
|
For internal use only. |