#include <ivfwidget/IvfMouseViewHandler.h>
Inheritance diagram for CIvfMouseViewHandler:
Public Types | |
enum | TKeyHandling { KH_NORMAL, KH_MIDDLE_BUTTON } |
Public Member Functions | |
CIvfMouseViewHandler (CIvfWidgetBase *widget, CIvfCamera *camera) | |
virtual | ~CIvfMouseViewHandler () |
IvfClassInfo ("CIvfMouseViewHandler", CIvfBase) | |
void | setPanScalefactor (double factor) |
double | getPanScalefactor () |
void | setZoomScalefactor (double factor) |
double | getZoomScalefactor () |
void | setAutoScale (bool flag) |
bool | getAutoScale () |
void | setAutoScaleBias (double bias) |
double | getAutoScaleBias () |
void | setKeyHandling (TKeyHandling keyHandling) |
TKeyHandling | getKeyHandling () |
virtual void | doResize (int width, int height) |
virtual void | doMouseDown (int x, int y) |
virtual void | doMouseMove (int x, int y) |
virtual void | doMouseUp (int x, int y) |
virtual void | onMouseDown (int x, int y) |
virtual void | onMouseMove (int x, int y) |
virtual void | onMouseUp (int x, int y) |
virtual void | onResize (int width, int height) |
This class implements basic mouse view handling. Default mode is view rotation using the left mouse button. Panning is done using the left mouse button Zooming is done using the right mouse button and the [Shift] key.
handlers.cpp, and manip.cpp.
Definition at line 45 of file IvfMouseViewHandler.h.
|
Class constructor
|
|
Class destructor |
|
Return auto scale state |
|
Return auto scale bias factor |
|
Return key handling mode |
|
Return panning scale factor |
|
Return zoom scale factor |
|
onMouseUp method The onMouse method is called when the mouse button is released. Reimplemented from CIvfMouseDownEvent. |
|
onMouseMove method The onMouseMove method is called whenever the mouse is moved in the window. Reimplemented from CIvfMouseMoveEvent. |
|
onMouseMove method The onMouseMove method is called whenever the mouse is moved in the window. Reimplemented from CIvfMouseUpEvent. |
|
onResize method The onResize method occurs when the widget has changed size. Typically code for initialising the viewport and perspective transformation goes here. Reimplemented from CIvfResizeEvent. |
|
Enable/disable auto scaling
The different scale factor are calculated as follows: |
|
Set autoscale bias factor A factor to modify the calculated autoscale. |
|
Set type of key handling.
|
|
Set panning scale factor
Panning is calculated by: |
|
Set zoom scale factor
Zoom is calculated by: |