| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/zoomgroundplatenavigation.h>

Public Member Functions | |
| ZoomGroundPlateNavigation (double yValOfGroundPlate=0.0) | |
| void | setWheelZoomFactor (double factor=0.8) |
| Each time the wheel is rolled one unit up, the distance to the focus point is multiplied with the wheel zoom factor. | |
| double | getWheelZoomFactor () const |
| Returns the wheel zoom factor. | |
| void | setDragZoomFactor (double factor=0.5) |
| When zooming by dragging, 100 pixels up-dragging is translated into a multiplication of the distance with the drag zoom factor. | |
| double | getDragZoomFactor () const |
| Returns the drag zoom factor. | |
| void | setMinDistance (double distance=0.001) |
| Sets the minimum allowed distance from the focus point. 'distance' must be positive. | |
| double | getMinDistance () const |
| Returns the minimum distance. | |
| void | setMaxDistance (double distance=0.0) |
| Sets a maximum allowed distance. | |
| double | getMaxDistance () const |
| Returns the maximum allowed distance. | |
| virtual void | onDragMotion (int x, int y, SO< MotionEvent >, MouseButtonFunctionID id, int startX, int startY) |
| virtual void | onDragEnd (int x, int y, SO< ButtonEvent >, MouseButtonFunctionID id, int startX, int startY) |
| virtual void | onWheelEvent (SO< WheelEvent > we) |
| Performs zoom due to wheel events. | |
| VRS_TYPEINFO (ZoomGroundPlateNavigation, GroundPlateNavigation) | |
Static Public Attributes | |
| static const MouseButtonFunctionID | Zoom |
Protected Member Functions | |
| virtual void | zoom (double factor, SO< Canvas > canvas) |
| bool | updateFocus (const Vector &from, const Vector &to, SO< Canvas > canvas, Vector &newFocus) |
| void | updateFocus (SO< Canvas > canvas) |
Protected Attributes | |
| bool | focusValid_ |
| Vector | lastFocus_ |
| double | wheelZoomFactor_ |
| double | dragZoomFactor_ |
| double | minDistance_ |
| double | maxDistance_ |
Static Protected Attributes | |
| static const double | EPSILON |
The zoom can be performed by mouse dragging or mouse wheel.
| VRS::ZoomGroundPlateNavigation::ZoomGroundPlateNavigation | ( | double | yValOfGroundPlate = 0.0 |
) |
| void VRS::ZoomGroundPlateNavigation::setWheelZoomFactor | ( | double | factor = 0.8 |
) |
Each time the wheel is rolled one unit up, the distance to the focus point is multiplied with the wheel zoom factor.
Similarly, the distance is divided by the factor, when the wheel is rolled back. 'factor' must be value in ]0,1[.
| double VRS::ZoomGroundPlateNavigation::getWheelZoomFactor | ( | ) | const |
Returns the wheel zoom factor.
| void VRS::ZoomGroundPlateNavigation::setDragZoomFactor | ( | double | factor = 0.5 |
) |
When zooming by dragging, 100 pixels up-dragging is translated into a multiplication of the distance with the drag zoom factor.
| double VRS::ZoomGroundPlateNavigation::getDragZoomFactor | ( | ) | const |
Returns the drag zoom factor.
| void VRS::ZoomGroundPlateNavigation::setMinDistance | ( | double | distance = 0.001 |
) |
Sets the minimum allowed distance from the focus point. 'distance' must be positive.
| double VRS::ZoomGroundPlateNavigation::getMinDistance | ( | ) | const |
Returns the minimum distance.
| void VRS::ZoomGroundPlateNavigation::setMaxDistance | ( | double | distance = 0.0 |
) |
Sets a maximum allowed distance.
If 'distance' is invalid (i.e. smaller than minDistance), the upper distance limit is disabled.
| double VRS::ZoomGroundPlateNavigation::getMaxDistance | ( | ) | const |
Returns the maximum allowed distance.
| virtual void VRS::ZoomGroundPlateNavigation::onDragMotion | ( | int | x, | |
| int | y, | |||
| SO< MotionEvent > | , | |||
| MouseButtonFunctionID | id, | |||
| int | startX, | |||
| int | startY | |||
| ) | [virtual] |
| virtual void VRS::ZoomGroundPlateNavigation::onDragEnd | ( | int | x, | |
| int | y, | |||
| SO< ButtonEvent > | , | |||
| MouseButtonFunctionID | id, | |||
| int | startX, | |||
| int | startY | |||
| ) | [virtual] |
| virtual void VRS::ZoomGroundPlateNavigation::onWheelEvent | ( | SO< WheelEvent > | we | ) | [virtual] |
| VRS::ZoomGroundPlateNavigation::VRS_TYPEINFO | ( | ZoomGroundPlateNavigation | , | |
| GroundPlateNavigation | ||||
| ) |
| virtual void VRS::ZoomGroundPlateNavigation::zoom | ( | double | factor, | |
| SO< Canvas > | canvas | |||
| ) | [protected, virtual] |
| bool VRS::ZoomGroundPlateNavigation::updateFocus | ( | const Vector & | from, | |
| const Vector & | to, | |||
| SO< Canvas > | canvas, | |||
| Vector & | newFocus | |||
| ) | [protected] |
const MouseButtonFunctionID VRS::ZoomGroundPlateNavigation::Zoom [static] |
const double VRS::ZoomGroundPlateNavigation::EPSILON [static, protected] |
bool VRS::ZoomGroundPlateNavigation::focusValid_ [protected] |
Vector VRS::ZoomGroundPlateNavigation::lastFocus_ [protected] |
double VRS::ZoomGroundPlateNavigation::wheelZoomFactor_ [protected] |
double VRS::ZoomGroundPlateNavigation::dragZoomFactor_ [protected] |
double VRS::ZoomGroundPlateNavigation::minDistance_ [protected] |
double VRS::ZoomGroundPlateNavigation::maxDistance_ [protected] |