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

Public Member Functions | |
| PlaneNavigation (const Vector &onPlane, const double &minHeight, LookAt *target, InputEvent::Button button, InputEvent::Modifier must_modifier=InputEvent::NoModifier, InputEvent::Modifier must_not_modifier=InputEvent::NoModifier, unsigned long launchKey= 'l', unsigned long storeKey= 's', bool launch=false) | |
| void | setNavMode (Navigation::NavMode mode) |
| Change the currently used navigation metaphor. | |
| void | setSensitivity (double sensitivity) |
| double | getSensitivity () const |
| void | setScaling (double horizontal, double vertical) |
| double | getHorizontalScaling () const |
| double | getVerticalScaling () const |
| virtual BehaviorNode::InvalidationHint | dragStart (int x, int y, ButtonEvent *) |
| virtual BehaviorNode::InvalidationHint | dragMotion (int x, int y, MotionEvent *) |
| virtual BehaviorNode::InvalidationHint | dragEnd (int x, int y, ButtonEvent *) |
| virtual BehaviorNode::InvalidationHint | handle (Event *) |
| Event handling methods. | |
| VRS_TYPEINFO (PlaneNavigation, Manipulator) | |
| VRS::PlaneNavigation::PlaneNavigation | ( | const Vector & | onPlane, | |
| const double & | minHeight, | |||
| LookAt * | target, | |||
| InputEvent::Button | button, | |||
| InputEvent::Modifier | must_modifier = InputEvent::NoModifier, |
|||
| InputEvent::Modifier | must_not_modifier = InputEvent::NoModifier, |
|||
| unsigned long | launchKey = 'l', |
|||
| unsigned long | storeKey = 's', |
|||
| bool | launch = false | |||
| ) |
A PlaneNavigation enables to navigate parallel to a plane P that is specified by onPlane and target->getUp(). It is also possible to change the distance of the camera from P, where the minHeight parameter defines a lower bound for the signed distance of the camera from P. target must not be 0, minHeight must be positive. In addition, launchKey and storeKey must not be equal.
| void VRS::PlaneNavigation::setNavMode | ( | Navigation::NavMode | mode | ) | [virtual] |
| void VRS::PlaneNavigation::setSensitivity | ( | double | sensitivity | ) |
| double VRS::PlaneNavigation::getSensitivity | ( | ) | const |
| void VRS::PlaneNavigation::setScaling | ( | double | horizontal, | |
| double | vertical | |||
| ) |
| double VRS::PlaneNavigation::getHorizontalScaling | ( | ) | const |
| double VRS::PlaneNavigation::getVerticalScaling | ( | ) | const |
The behavior of a PlaneNavigation is specified by several parameters that were quite inconvenient to specify explicitly. By default all parameters are chosen in a way that the Navigation behaves "reasonable" in a scene that is scaled to the [0,1]-cube. SetScaling() enables to specify several parameters at once by "scaling" the navigation. Thereby the scale factor can be specified seperately for horziontal and vertical movement. The parameters horizontal and vertical must be positive.
| virtual BehaviorNode::InvalidationHint VRS::PlaneNavigation::dragStart | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | ||||
| ) | [virtual] |
Reimplemented from VRS::Navigation.
| virtual BehaviorNode::InvalidationHint VRS::PlaneNavigation::dragMotion | ( | int | x, | |
| int | y, | |||
| MotionEvent * | ||||
| ) | [virtual] |
Reimplemented from VRS::Navigation.
| virtual BehaviorNode::InvalidationHint VRS::PlaneNavigation::dragEnd | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | e | |||
| ) | [virtual] |
These methods implements the concrete manipulator functionality. They are overloaded by subclasses. `dragStart' is called if an event of type `ButtonEvent` is received which matches the button condition. `dragMotion' is called if the interaction has been started already and an `MotionEvent' has been received which matches the modifier conditions. `dragEnd' is called if the interaction has been started already and an event of type `ButtonEvent' has been received which matches the button condition. The return value specifies the redrawing code required by `handle'. (It specifies if the world, a canvas or nothing has to be redrawn).
Reimplemented from VRS::Navigation.
| virtual BehaviorNode::InvalidationHint VRS::PlaneNavigation::handle | ( | Event * | ) | [virtual] |
| VRS::PlaneNavigation::VRS_TYPEINFO | ( | PlaneNavigation | , | |
| Manipulator | ||||
| ) |