55#include <Inventor/SbBox.h>
56#include <Inventor/SbViewportRegion.h>
57#include <Inventor/SbLinear.h>
58#include <Inventor/nodekits/SoInteractionKit.h>
59#include <Inventor/misc/SoCallbackList.h>
60#include <Inventor/fields/SoSFBool.h>
61#include <Inventor/nodes/SoMatrixTransform.h>
62#include <Inventor/nodes/SoScale.h>
541 SO_KIT_CATALOG_ENTRY_HEADER(motionMatrix);
758 void addOtherEventCallback(
SoDraggerCB *f,
void *userData = NULL);
759 void removeOtherEventCallback(
SoDraggerCB *f,
void *userData = NULL);
760 void clearOtherEventCallbacks();
770 void registerChildDragger(
SoDragger *child);
771 void unregisterChildDragger(
SoDragger *child);
778 void registerChildDraggerMovingIndependently(
SoDragger *child);
779 void unregisterChildDraggerMovingIndependently(
SoDragger *child);
786 SbVec3f getLocalStartingPoint();
788 SbVec3f getWorldStartingPoint();
799 void getPartToLocalMatrix(
const SbName &partName,
804 void transformMatrixLocalToWorld(
const SbMatrix &fromMatrix,
806 void transformMatrixWorldToLocal(
const SbMatrix &fromMatrix,
808 void transformMatrixToLocalSpace(
const SbMatrix &fromMatrix,
822 const SbMatrix &getStartMotionMatrix() {
return startMotionMatrix; }
828 virtual void saveStartParameters();
831 const SoPath *getPickPath()
const;
832 const SoEvent *getEvent()
const;
838 SoPath *createPathToThis();
846 const SoPath *getSurrogatePartPickedOwner()
const
847 {
return pathToSurrogatePickOwner;}
850 const SbName &getSurrogatePartPickedName()
const
851 {
return surrogateNameInPickOwner; }
856 const SoPath *getSurrogatePartPickedPath()
const
857 {
return surrogatePathInPickOwner;}
865 void setStartingPoint(
const SbVec3f &newPoint );
890 const SbViewVolume &getViewVolume() {
return viewVolume; }
893 void setViewVolume(
const SbViewVolume &vol) { viewVolume = vol; }
910 void setTempPathToThis(
const SoPath *somethingClose);
913 virtual void grabEventsSetup();
914 virtual void grabEventsCleanup();
929 void workFieldsIntoTransform(
SbMatrix &mtx );
933 static void workValuesIntoTransform(
SbMatrix &mtx,
958 const SbMatrix *conversion = NULL );
961 const SbMatrix *conversion = NULL );
964 const SbMatrix *conversion = NULL );
967 SbBool isTrackerDirectMode()
const;
972 static void initClass();
973 static void exitClass();
974 SB_THREAD_TLS_HEADER();
977 static void initClasses();
978 static void exitClasses();
985 enum ProjectorFrontSetting {
986 FRONT, BACK, USE_PICK
988 void setFrontOnProjector( ProjectorFrontSetting newVal )
989 { projectorFrontSetting = newVal; }
990 ProjectorFrontSetting getFrontOnProjector()
const
991 {
return projectorFrontSetting;}
993 inline void setInteracting(
bool flag) { m_draggerInteracting = flag; }
1004 static void enableCB(
void *,
SoSensor * );
1011 SbVec2f getNormalizedLocaterPosition();
1012 const SbVec2f& getLocaterPosition();
1018 const SbVec2f& getStartLocaterPosition()
const {
return startLocater; }
1023 void setStartLocaterPosition(
const SbVec2f& p) { startLocater = p; }
1027 SbBool isAdequateConstraintMotion();
1037 virtual SbBool shouldGrabBasedOnSurrogate(
const SoPath *pickPath,
1038 const SoPath *surrogatePath );
1043 void setCameraInfo(
SoAction *action );
1060 void setIgnoreInBbox(
SbBool newVal ) { ignoreInBbox = newVal; }
1061 SbBool isIgnoreInBbox() {
return ignoreInBbox; }
1070 static void childTransferMotionAndValueChangedCB(
void *,
SoDragger *);
1071 static void childValueChangedCB(
void *,
SoDragger *);
1072 static void childStartCB(
void *,
SoDragger *);
1073 static void childMotionCB(
void *,
SoDragger *);
1074 static void childFinishCB(
void *,
SoDragger *);
1075 static void childOtherEventCB(
void *,
SoDragger *);
1080 void setActiveChildDragger(
SoDragger *newChildDragger );
1081 SoDragger *getActiveChildDragger()
const {
return activeChildDragger; }
1101 virtual void setDefaultOnNonWritingFields();
1105 virtual SbBool applyTrackerMotion();
1141 SbBool valueChangedCallbacksEnabled;
1161 void setPickPath(
SoPath *newPickPath);
1165 void setNoPickedSurrogate();
1166 void setPickedSurrogate(
SoPath *pathToOwner,
SbName &nameUsedByOwner,
1167 SoPath *pathUsedByOwner );
1169 SbName surrogateNameInPickOwner;
1170 SoPath *pathToSurrogatePickOwner;
1171 SoPath *surrogatePathInPickOwner;
1181 SoTempPath *tempPathToThis;
1186 SbBool isTempPathToThisOk();
1188 SoTempPath *createTempPathFromFullPath(
const SoFullPath *fp )
const;
1197 static float minScale;
1205 void validateMatrices(
SoAction* );
1213 SbBool cachedPathToThisValid;
1214 SbBool cachedMotionMatrixValid;
1228 bool m_draggerInteracting;
1230 ProjectorFrontSetting projectorFrontSetting;
Character string stored in a hash table.
List of generic (void *) pointers.
Class for representing a rotation.
Class for representing a viewport.
Abstract base class for all actions.
Manages a list of callbacks and associated data.
Base class for nodekits that move in response to click-drag-release mouse events.
void setMinGesture(int pixels)
Sets the number of pixels of movement required to initiate a constraint gesture.
void removeMotionCallback(SoDraggerCB *f, void *userData=NULL)
Removes motion callback.
void removeFinishCallback(SoDraggerCB *f, void *userData=NULL)
Removes finish callback.
SoSFBool enableCallbacks
If set to FALSE, motion, start and finish callbacks are disabled.
SoSFBool isActive
TRUE when mouse is down and dragging, else FALSE.
void SoDraggerCB(void *userData, SoDragger *dragger)
Used in defining the callback function lists.
TrackerDirectMode getTrackerDirectMode() const
Get the current tracker direct mode for this dragger.
void setMinGesture(float pixels)
Float version of setMinGesture.
void addFinishCallback(SoDraggerCB *f, void *userData=NULL)
Adds finish callback.
TrackerDirectMode
Tracker direct mode.
@ NONE
Dragger will not use tracker values directly (default).
@ MOVE
Dragger will use tracker position values directly.
@ DEFAULT
Dragger will use its natural default direct behavior (which will be NONE, MOVE, ROTATE,...
@ FREE
Dragger will use tracker position and orientation directly.
@ ROTATE
Dragger will use tracker orientation values directly.
void addStartCallback(SoDraggerCB *f, void *userData=NULL)
Adds start callback.
static TrackerDirectMode getInitialTrackerDirectMode()
Get the initial tracker direct mode.
void removeStartCallback(SoDraggerCB *f, void *userData=NULL)
Removes start callback.
float getMinGestureFloat() const
Float version of getMinGesture.
void removeValueChangedCallback(SoDraggerCB *f, void *userData=NULL)
Removes value-changed callback.
static void setMinScale(float newMinScale)
Sets the smallest scale that any dragger will write.
void setMotionMatrix(const SbMatrix &newMatrix)
Set the motion matrix.
int getMinGesture() const
Gets the number of pixels of movement required to initiate a constraint gesture.
void addMotionCallback(SoDraggerCB *f, void *userData=NULL)
Adds motion callback.
void addValueChangedCallback(SoDraggerCB *f, void *userData=NULL)
Adds value-changed callback.
SbBool enableValueChangedCallbacks(SbBool newVal)
You can temporarily disable a dragger's valueChangedCallbacks.
static float getMinScale()
Gets the smallest scale that any dragger will write.
const SbMatrix & getMotionMatrix()
Get the motion matrix.
static void setInitialTrackerDirectMode(TrackerDirectMode mode=DEFAULT)
Set the initial tracker direct mode for draggers not yet created.
void setTrackerDirectMode(TrackerDirectMode mode=DEFAULT)
Sets the tracker direct mode for this dragger (see description above).
Base class for all events.
Sensor class that can be attached to Open Inventor fields.
Path that allows access to hidden children.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Computes transformation matrix for a subgraph.
Allows nodes in a graph to receive input events.
Base class for all interaction nodekit classes.
Path that points to a list of hierarchical nodes.
Represents point on surface of picked object.
Field containing a single Boolean value.
Searches for nodes in a scene graph.
Abstract base class for Open Inventor sensors.