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