23 #ifndef QGLVIEWER_MANIPULATED_FRAME_H 24 #define QGLVIEWER_MANIPULATED_FRAME_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);
308 #endif // QGLVIEWER_MANIPULATED_FRAME_H
void setTranslationSensitivity(float sensitivity)
A ManipulatedFrame is a Frame that can be rotated and translated using the mouse. ...
void setWheelSensitivity(float sensitivity)
Constraint * previousConstraint_
Quaternion spinningQuaternion_
float translationSensitivity() const
float spinningSensitivity_
void setRotationSensitivity(float sensitivity)
Abstract class for objects that grab mouse focus in a QGLViewer.
float wheelSensitivity() const
float rotationSensitivity() const
float spinningSensitivity() const
void setSpinningQuaternion(const Quaternion &spinningQuaternion)
void setSpinningSensitivity(float sensitivity)
A perspective or orthographic camera.
The Quaternion class represents 3D rotations and orientations.
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.