Home Documentation Download Screenshots Developper

QGLViewer mouse behavior

The mouse can be used to manipulate two types of objects : the camera or a manipulated frame. The behavior is selected from the specific state key that is pressed when a mouse button is clicked:
Behavior State key Description
Camera None Moves the camera in the scene.
Frame Alt Moves a manipulated frame in the scene (if any).

The Camera motion behavior :
There are two modes for the camera behavior (see camera::mode()) : REVOLVE (default, used to revolve around a 3D object) or FLY (walkthrough applications).

In REVOLVE mode : With a double click, the original action is automated : When two buttons are pressed together, the motion is defined with respect to the screen coordinate system: With a (c) double simple click (two successive mouse clicks and releases on different buttons, with no mouse motion in between) : In FLY mode : The manipulated frame behavior :
When a manipulatedFrame is defined and attached to the viewer, you can move this frame with the mouse. The mouse bindings are the same as for the camera in REVOLVE mode. See the manipulatedFrame example.

Mouse behavior customization

As for the keyboard, there are two ways of changing the default mouse behavior:

Valid XHTML 1.0! Valid CSS! Last modified on jeudi, janvier 16 2003.