1 #ifndef COIN_SODRAGGER_H
2 #define COIN_SODRAGGER_H
27 #include <Inventor/nodekits/SoInteractionKit.h>
28 #include <Inventor/fields/SoSFBool.h>
29 #include <Inventor/lists/SoCallbackList.h>
30 #include <Inventor/SbMatrix.h>
31 #include <Inventor/SbVec3f.h>
32 #include <Inventor/SbVec2s.h>
33 #include <Inventor/SbViewVolume.h>
34 #include <Inventor/SbViewportRegion.h>
37 #include <Inventor/nodes/SoScale.h>
38 #endif // COIN_INTERNAL
50 typedef void SoDraggerCB(
void * data,
SoDragger * dragger);
58 SO_KIT_CATALOG_ENTRY_HEADER(motionMatrix);
74 void addStartCallback(SoDraggerCB * func,
void * data = NULL);
75 void removeStartCallback(SoDraggerCB * func,
void * data = NULL);
76 void addMotionCallback(SoDraggerCB * func,
void * data = NULL);
77 void removeMotionCallback(SoDraggerCB * func,
void * data = NULL);
78 void addFinishCallback(SoDraggerCB * func,
void * data = NULL);
79 void removeFinishCallback(SoDraggerCB * func,
void * data = NULL);
80 void addValueChangedCallback(SoDraggerCB * func,
void * data = NULL);
81 void removeValueChangedCallback(SoDraggerCB * func,
void * data = NULL);
82 void setMinGesture(
int pixels);
83 int getMinGesture(
void)
const;
84 SbBool enableValueChangedCallbacks(SbBool newval);
85 const SbMatrix & getMotionMatrix(
void);
86 void addOtherEventCallback(SoDraggerCB * func,
void * data = NULL);
87 void removeOtherEventCallback(SoDraggerCB * func,
void * data = NULL);
88 void registerChildDragger(
SoDragger * child);
89 void unregisterChildDragger(
SoDragger * child);
90 void registerChildDraggerMovingIndependently(
SoDragger * child);
91 void unregisterChildDraggerMovingIndependently(
SoDragger * child);
92 SbMatrix getLocalToWorldMatrix(
void);
93 SbMatrix getWorldToLocalMatrix(
void);
94 SbVec3f getLocalStartingPoint(
void);
95 SbVec3f getWorldStartingPoint(
void);
96 void getPartToLocalMatrix(
const SbName & partname,
SbMatrix & parttolocalmatrix,
SbMatrix & localtopartmatrix);
97 void transformMatrixLocalToWorld(
const SbMatrix & frommatrix,
SbMatrix & tomatrix);
98 void transformMatrixWorldToLocal(
const SbMatrix & frommatrix,
SbMatrix & tomatrix);
99 void transformMatrixToLocalSpace(
const SbMatrix & frommatrix,
SbMatrix & tomatrix,
const SbName & fromspacepartname);
100 void setMotionMatrix(
const SbMatrix & newmatrix);
101 void valueChanged(
void);
102 const SbMatrix & getStartMotionMatrix(
void);
103 virtual void saveStartParameters(
void);
104 const SoPath * getPickPath(
void)
const;
105 const SoEvent * getEvent(
void)
const;
106 SoPath * createPathToThis(
void);
107 const SoPath * getSurrogatePartPickedOwner(
void)
const;
108 const SbName & getSurrogatePartPickedName(
void)
const;
109 const SoPath * getSurrogatePartPickedPath(
void)
const;
111 void setStartingPoint(
const SbVec3f & newpoint);
118 void setTempPathToThis(
const SoPath * somethingclose);
121 void workFieldsIntoTransform(
SbMatrix & mtx);
122 void setFrontOnProjector(ProjectorFrontSetting newval);
123 ProjectorFrontSetting getFrontOnProjector(
void)
const;
125 static void setMinScale(
float newminscale);
126 static float getMinScale(
void);
133 static void initClass(
void);
140 SbVec2f getNormalizedLocaterPosition(
void);
141 SbVec2s getLocaterPosition(
void);
142 SbVec2s getStartLocaterPosition(
void)
const;
143 void setStartLocaterPosition(
SbVec2s p);
144 SbBool isAdequateConstraintMotion(
void);
145 virtual SbBool shouldGrabBasedOnSurrogate(
const SoPath * pickpath,
const SoPath * surrogatepath);
146 void setCameraInfo(
SoAction * action);
149 void setIgnoreInBbox(SbBool newval);
150 SbBool isIgnoreInBbox(
void);
152 void setActiveChildDragger(
SoDragger * newchilddragger);
153 SoDragger * getActiveChildDragger(
void)
const;
156 static void childTransferMotionAndValueChangedCB(
void *,
SoDragger *);
157 static void childValueChangedCB(
void *,
SoDragger *);
158 static void childStartCB(
void *,
SoDragger *);
159 static void childMotionCB(
void *,
SoDragger *);
160 static void childFinishCB(
void *,
SoDragger *);
161 static void childOtherEventCB(
void *,
SoDragger *);
166 void updateDraggerCache(
const SoPath * path);
169 void updateElements(
class SoState * state);
170 SbBool isPicked(
SoPath * path);
172 static float minscale;
174 class SoDraggerP * pimpl;
177 #endif // !COIN_SODRAGGER_H