23 #ifndef QGLVIEWER_MANIPULATED_CAMERA_FRAME_H
24 #define QGLVIEWER_MANIPULATED_CAMERA_FRAME_H
51 friend class ::QGLViewer;
57 ManipulatedCameraFrame();
59 virtual ~ManipulatedCameraFrame() {}
61 ManipulatedCameraFrame(
const ManipulatedCameraFrame& mcf);
62 ManipulatedCameraFrame& operator=(
const ManipulatedCameraFrame& mcf);
75 Vec pivotPoint()
const {
return pivotPoint_; }
77 void setPivotPoint(
const Vec& point) { pivotPoint_ = point; }
80 Vec revolveAroundPoint()
const { qWarning(
"revolveAroundPoint() is deprecated, use pivotPoint() instead");
return pivotPoint(); }
81 void setRevolveArountPoint(
const Vec& point) { qWarning(
"setRevolveAroundPoint() is deprecated, use setPivotPoint() instead"); setPivotPoint(point); }
106 bool rotatesAroundUpVector()
const {
return rotatesAroundUpVector_; }
110 void setRotatesAroundUpVector(
bool constrained) { rotatesAroundUpVector_ = constrained; }
120 bool zoomsOnPivotPoint()
const {
return zoomsOnPivotPoint_; }
124 void setZoomsOnPivotPoint(
bool enabled) { zoomsOnPivotPoint_ = enabled; }
128 void zoom(qreal delta,
const Camera *
const camera);
139 void setFlySpeed(qreal speed) { flySpeed_ = speed; }
145 void setSceneUpVector(
const Vec& up) { sceneUpVector_ = up; }
156 qreal flySpeed()
const {
return flySpeed_; }
171 Vec sceneUpVector()
const {
return sceneUpVector_; }
174 Vec flyUpVector()
const;
175 void setFlyUpVector(
const Vec& up);
182 virtual void mouseReleaseEvent(QMouseEvent*
const event,
Camera*
const camera);
183 virtual void mouseMoveEvent (QMouseEvent*
const event,
Camera*
const camera);
184 virtual void wheelEvent (QWheelEvent*
const event,
Camera*
const camera);
196 virtual QDomElement domElement(
const QString& name, QDomDocument& document)
const;
198 virtual void initFromDOMElement(
const QDomElement& element);
203 virtual void startAction(
int ma,
bool withConstraint=
true);
207 virtual void flyUpdate();
210 void updateSceneUpVector();
221 bool rotatesAroundUpVector_;
224 bool constrainedRotationIsReversed_;
226 bool zoomsOnPivotPoint_;
233 #endif // QGLVIEWER_MANIPULATED_CAMERA_FRAME_H