23 #ifndef QGLVIEWER_MANIPULATED_FRAME_H
24 #define QGLVIEWER_MANIPULATED_FRAME_H
27 #include "mouseGrabber.h"
29 #if QT_VERSION >= 0x040000
36 # include <qdatetime.h>
104 friend class ::QGLViewer;
229 virtual void startSpinning(
int updateInterval);
232 virtual void stopSpinning() { spinningTimer_.stop(); isSpinning_ =
false; };
242 virtual void mousePressEvent (QMouseEvent*
const event,
Camera*
const camera);
243 virtual void mouseMoveEvent (QMouseEvent*
const event,
Camera*
const camera);
244 virtual void mouseReleaseEvent (QMouseEvent*
const event,
Camera*
const camera);
245 virtual void mouseDoubleClickEvent(QMouseEvent*
const event,
Camera*
const camera);
246 virtual void wheelEvent (QWheelEvent*
const event,
Camera*
const camera);
252 bool isManipulated()
const;
258 virtual void checkIfGrabsMouse(
int x,
int y,
const Camera*
const camera);
264 virtual QDomElement domElement(
const QString& name, QDomDocument& document)
const;
266 virtual void initFromDOMElement(
const QDomElement& element);
271 Quaternion deformedBallQuaternion(
int x,
int y,
float cx,
float cy,
const Camera*
const camera);
276 virtual void startAction(
int ma,
bool withConstraint=
true);
277 void computeMouseSpeed(
const QMouseEvent*
const e);
278 int mouseOriginalDirection(
const QMouseEvent*
const e);
281 QPoint prevPos_, pressPos_;
286 float rotSensitivity_;
287 float transSensitivity_;
288 float spinningSensitivity_;
289 float wheelSensitivity_;
292 QTime last_move_time;
296 QTimer spinningTimer_;
303 bool keepsGrabbingMouse_;
308 #endif // QGLVIEWER_MANIPULATED_FRAME_H