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

Public Member Functions | |
| ApproachNavigation (const Vector &onPlane, double minHeight, double accelerate, LookAt *target, InputEvent::Button button, InputEvent::Modifier must_modifier=InputEvent::NoModifier, InputEvent::Modifier must_not_modifier=InputEvent::NoModifier) | |
| virtual | ~ApproachNavigation () |
| void | setNavMode (Navigation::NavMode mode) |
| Change the currently used navigation metaphor. | |
| void | setAcceleration (double acceleration) |
| double | getAcceleration () 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 *) |
| BehaviorNode::InvalidationHint | onTimer (TimeEvent *e) |
| virtual BehaviorNode::InvalidationHint | handle (Event *e) |
| Event handling methods. | |
| VRS_TYPEINFO (ApproachNavigation, Manipulator) | |
| VRS::ApproachNavigation::ApproachNavigation | ( | const Vector & | onPlane, | |
| double | minHeight, | |||
| double | accelerate, | |||
| LookAt * | target, | |||
| InputEvent::Button | button, | |||
| InputEvent::Modifier | must_modifier = InputEvent::NoModifier, |
|||
| InputEvent::Modifier | must_not_modifier = InputEvent::NoModifier | |||
| ) |
The ApproachNavigation is specified for a specific ground plane P, given by its normal (target->getUp()) and the point onPlane. The acceleration of the camera increases with the signed distance of the camera from the ground plane. More exactly, if the distance of the camera from the ground is x*minHeight, the applied acceleration is x*accelerate. lookAt must not be NULL, minHeight and accelerate are expected to be positive. It is ensured that the signed distance of the camera from P is always greater or equal minHeight.
| virtual VRS::ApproachNavigation::~ApproachNavigation | ( | ) | [virtual] |
| void VRS::ApproachNavigation::setNavMode | ( | Navigation::NavMode | mode | ) | [virtual] |
| void VRS::ApproachNavigation::setAcceleration | ( | double | acceleration | ) |
| double VRS::ApproachNavigation::getAcceleration | ( | ) | const [inline] |
The acceleration parameter specifies the acceleration for the case that the height (i.e. the signed distance from the ground plane) of the camera equals minHeight (see constructor comment).
| virtual BehaviorNode::InvalidationHint VRS::ApproachNavigation::dragStart | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | ||||
| ) | [virtual] |
Reimplemented from VRS::Navigation.
| virtual BehaviorNode::InvalidationHint VRS::ApproachNavigation::dragMotion | ( | int | x, | |
| int | y, | |||
| MotionEvent * | ||||
| ) | [virtual] |
Reimplemented from VRS::Navigation.
| virtual BehaviorNode::InvalidationHint VRS::ApproachNavigation::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.
| BehaviorNode::InvalidationHint VRS::ApproachNavigation::onTimer | ( | TimeEvent * | e | ) |
| virtual BehaviorNode::InvalidationHint VRS::ApproachNavigation::handle | ( | Event * | e | ) | [virtual] |
| VRS::ApproachNavigation::VRS_TYPEINFO | ( | ApproachNavigation | , | |
| Manipulator | ||||
| ) |