Main Page Namespace List Class Hierarchy Compound List All functions | Search
ManipulatedCameraFrame Class Reference
A Camera Frame that can be rotated and translated with the mouse.
More...
Inherits ManipulatedFrame.
List of all members.
Detailed Description
A Camera Frame that can be rotated and translated with the mouse.
A ManipulatedCameraFrame is a specialization of a ManipulatedFrame, designed for associated Camera frames. All 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.
See the mouse page for a description of the possible displacements that can be performed using the mouse.
The ManipulatedFrame::isManipulated() function is used to call QGLViewer::fastDraw() instead of QGLViewer::draw() for interactive scene displays when the camera is manipulated (see the fastDraw example).
Constructor & Destructor Documentation
|
|
Virtual destructor. Empty. |
Member Function Documentation
| QDomElement domElement |
( |
const QString & |
name, |
|
|
QDomDocument & |
doc |
|
) |
const [virtual] |
|
| float flySpeed |
( |
|
) |
const [inline] |
|
| Vec flyUpVector |
( |
|
) |
const [inline] |
|
|
|
Return the up vector used in ManipulatedFrame::MOVE_FORWARD and ManipulatedFrame::MOVE_BACKWARD modes. This vector is normal to the displacement horizontal plane. Horizontal displacements of the mouse rotates the frame around this vector. It is expressed in the world coordinate system. Vertical displacements of the mouse rotate around the Camera Y axis. |
| void initFromDOMElement |
( |
const QDomElement & |
de |
) |
[virtual] |
|
| void mouseMoveEvent |
( |
QMouseEvent * |
const, |
|
|
const Camera * |
const |
|
) |
[protected, virtual] |
|
|
|
Move the camera frame according to the mouse motion. The camera is given as an argument so that its parameters (width and height of the window, fieldOfView) are available in order to fit the mouse motion and the display. Emits manipulated().
Reimplemented from ManipulatedFrame. |
| void mouseReleaseEvent |
( |
QMouseEvent * |
const, |
|
|
Camera * |
const |
|
) |
[protected, virtual] |
|
|
|
When the user releases the mouse button, the manipulatedFrame action is stopped.
Reimplemented from ManipulatedFrame. |
| Quaternion quaternionFromThetaPhi |
( |
const int |
x, |
|
|
const int |
y, |
|
|
const Camera *const |
camera |
|
) |
[protected] |
|
|
|
Set lastQuat according to the mouse motion. Simple Theta-Phi inferred from the X-flyUpVector() axis. |
| void setFlySpeed |
( |
const float |
s |
) |
[inline, slot] |
|
| void setFlyUpVector |
( |
const Vec & |
up |
) |
[inline, slot] |
|
|
|
Defines the fly up vector (used in MOVE_FORWARD and MOVE_BACKWARD mode), defined in the world coordinate system. See flyUpVector(). |
| void startAction |
( |
MouseMotion |
ma, |
|
|
bool |
withConstraint = true |
|
) |
[protected, virtual] |
|
| void updateFlyUpVector |
( |
|
) |
[protected] |
|
|
|
This function will be called by the camera when the camera orientation is changed, so that the flyUpVector (private) is changed accordingly. You should not need to call this function. |
| void updateFrameInFlyMode |
( |
|
) |
[protected, slot] |
|
| void wheelEvent |
( |
QWheelEvent * |
const, |
|
|
const Camera *const |
camera |
|
) |
[protected, virtual] |
|
|
|
The wheel behavior depends on the wheel binded action. Current possible actions are ZOOM, MOVE_FORWARD, MOVE_BACKWARD. See QGLViewer::setWheelBinding() to customize the binding.
Depending on your system configuration, you may have to actually press the wheel while wheeling.
Reimplemented from ManipulatedFrame. |
Generated on Tue Jul 22 12:10:56 2003 for libQGLViewer by
1.3.1