Inherits ManipulatedFrame.
Revolve around point | |
Vec | revolveAroundPoint () const |
void | setRevolveAroundPoint (const Vec &revolveAroundPoint) |
Fly parameters | |
float | flySpeed () const |
Vec | flyUpVector () const |
void | setFlySpeed (float speed) |
void | setFlyUpVector (const Vec &up) |
XML representation | |
virtual QDomElement | domElement (const QString &name, QDomDocument &document) const |
virtual void | initFromDOMElement (const QDomElement &element) |
Mouse event handlers | |
virtual void | mouseReleaseEvent (QMouseEvent *const event, Camera *const camera) |
virtual void | mouseMoveEvent (QMouseEvent *const event, Camera *const camera) |
virtual void | wheelEvent (QWheelEvent *const event, Camera *const camera) |
Spinning | |
virtual void | spin () |
Public Member Functions | |
ManipulatedCameraFrame () | |
virtual | ~ManipulatedCameraFrame () |
ManipulatedCameraFrame (const ManipulatedCameraFrame &mcf) | |
ManipulatedCameraFrame & | operator= (const ManipulatedCameraFrame &mcf) |
A ManipulatedCameraFrame is a specialization of a ManipulatedFrame, designed to be set as the Camera::frame(). Mouse motions are basically interpreted in a negated way: when the mouse goes to the right, the ManipulatedFrame translation goes to the right, while the ManipulatedCameraFrame has to go to the left, so that the scene seems to move to the right.
A ManipulatedCameraFrame rotates around its revolveAroundPoint(), which corresponds to the associated Camera::revolveAroundPoint().
A ManipulatedCameraFrame can also "fly" in the scene. It basically moves forward, and turns according to the mouse motion. See flySpeed(), flyUpVector() and the MOVE_FORWARD and MOVE_BACKWARD QGLViewer::MouseAction.
See the mouse page for a description of the possible actions that can be performed using the mouse and their bindings.
|
Default constructor. flySpeed() is set to 0.0 and flyUpVector() is (0,1,0). The revolveAroundPoint() is set to (0,0,0).
|
|
Virtual destructor. Empty. |
|
Copy constructor. Performs a deep copy of all members using operator=(). |
|
Returns an XML
Adds to the ManipulatedFrame::domElement() the ManipulatedCameraFrame specific informations in a
Use initFromDOMElement() to restore the ManipulatedCameraFrame state from the resulting See Vec::domElement() for a complete example. See also Quaternion::domElement(), Frame::domElement(), Camera::domElement()... Reimplemented from ManipulatedFrame. |
|
Returns the fly speed, expressed in OpenGL units. It corresponds to the incremental displacement that is periodically applied to the ManipulatedCameraFrame position when a MOVE_FORWARD or MOVE_BACKWARD QGLViewer::MouseAction is proceeded.
|
|
Returns the up vector used in fly mode, expressed in the world coordinate system.
Fly mode corresponds to the MOVE_FORWARD and MOVE_BACKWARD QGLViewer::MouseAction bindings. In these modes, horizontal displacements of the mouse rotate the ManipulatedCameraFrame around this vector. Vertical displacements rotate always around the Camera Default value is (0,1,0), but it is updated by the Camera when set as its Camera::frame(). Camera::setOrientation() and Camera::setUpVector()) modify this value and should be used instead. |
|
Restores the ManipulatedCameraFrame state from a First calls ManipulatedFrame::initFromDOMElement() and then initializes ManipulatedCameraFrame specific parameters. Reimplemented from ManipulatedFrame. |
|
Overloading of ManipulatedFrame::mouseMoveEvent(). Motion depends on mouse binding (see mouse page for details). The resulting displacements are basically inverted from those of a ManipulatedFrame. Reimplemented from ManipulatedFrame. |
|
This is an overload of ManipulatedFrame::mouseReleaseEvent(). The QGLViewer::MouseAction is terminated. Reimplemented from ManipulatedFrame. |
|
Equal operator. Calls ManipulatedFrame::operator=() and then copy attributes. |
|
Returns the point the ManipulatedCameraFrame revolves around when rotated. It is defined in the world coordinate system. Default value is (0,0,0). When the ManipulatedCameraFrame is associated to a Camera, Camera::revolveAroundPoint() also returns this value. This point can interactively be changed using the mouse (see RAP_FROM_PIXEL and RAP_IS_CENTER in the mouse page). |
|
Sets the flySpeed(), defined in OpenGL units. Default value is 0.0, but it is modified according to the QGLViewer::sceneRadius() when the ManipulatedCameraFrame is set as the Camera::frame(). |
|
Sets the flyUpVector(), defined in the world coordinate system. Default value is (0,1,0), but it is updated by the Camera when set as its Camera::frame(). Use Camera::setUpVector() instead in that case. |
|
Sets the revolveAroundPoint(), defined in the world coordinate system. |
|
Overloading of ManipulatedFrame::spin(). Rotates the ManipulatedCameraFrame around its revolveAroundPoint() instead of its origin. Reimplemented from ManipulatedFrame. |
|
This is an overload of ManipulatedFrame::wheelEvent(). The wheel behavior depends on the wheel binded action. Current possible actions are ZOOM, MOVE_FORWARD, MOVE_BACKWARD. ZOOM speed depends on wheelSensitivity() while MOVE_FORWARD and MOVE_BACKWARD depend on flySpeed(). See QGLViewer::setWheelBinding() to customize the binding. Reimplemented from ManipulatedFrame. |