23 #ifndef QGLVIEWER_MANIPULATED_FRAME_H 24 #define QGLVIEWER_MANIPULATED_FRAME_H 99 friend class ::QGLViewer;
236 virtual void startSpinning(
int updateInterval);
239 virtual void stopSpinning() { spinningTimer_.stop(); isSpinning_ =
false; }
249 virtual void mousePressEvent (QMouseEvent*
const event,
Camera*
const camera);
250 virtual void mouseMoveEvent (QMouseEvent*
const event,
Camera*
const camera);
251 virtual void mouseReleaseEvent (QMouseEvent*
const event,
Camera*
const camera);
252 virtual void mouseDoubleClickEvent(QMouseEvent*
const event,
Camera*
const camera);
253 virtual void wheelEvent (QWheelEvent*
const event,
Camera*
const camera);
259 bool isManipulated()
const;
274 virtual void checkIfGrabsMouse(
int x,
int y,
const Camera*
const camera);
280 virtual QDomElement domElement(
const QString& name, QDomDocument& document)
const;
282 virtual void initFromDOMElement(
const QDomElement& element);
287 Quaternion deformedBallQuaternion(
int x,
int y, qreal cx, qreal cy,
const Camera*
const camera);
292 virtual void startAction(
int ma,
bool withConstraint=
true);
293 void computeMouseSpeed(
const QMouseEvent*
const e);
294 int mouseOriginalDirection(
const QMouseEvent*
const e);
298 qreal deltaWithPrevPos(QMouseEvent*
const event,
Camera*
const camera)
const;
300 qreal wheelDelta(
const QWheelEvent* event)
const;
306 void zoom(qreal delta,
const Camera *
const camera);
335 #endif // QGLVIEWER_MANIPULATED_FRAME_H
qreal translationSensitivity_
A ManipulatedFrame is a Frame that can be rotated and translated using the mouse. ...
QGLViewer::MouseAction currentMouseAction() const
void setZoomSensitivity(qreal sensitivity)
qreal wheelSensitivity() const
Constraint * previousConstraint_
Quaternion spinningQuaternion_
void setRotationSensitivity(qreal sensitivity)
void setWheelSensitivity(qreal sensitivity)
void setSpinningSensitivity(qreal sensitivity)
Abstract class for objects that grab mouse focus in a QGLViewer.
qreal rotationSensitivity() const
qreal spinningSensitivity_
qreal zoomSensitivity() const
void setSpinningQuaternion(const Quaternion &spinningQuaternion)
QGLViewer::MouseAction action_
A perspective or orthographic camera.
qreal translationSensitivity() const
The Quaternion class represents 3D rotations and orientations.
qreal rotationSensitivity_
virtual ~ManipulatedFrame()
virtual void stopSpinning()
The Frame class represents a coordinate system, defined by a position and an orientation.
Quaternion spinningQuaternion() const
An interface class for Frame constraints.
qreal spinningSensitivity() const
void setTranslationSensitivity(qreal sensitivity)