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

Public Types | |
| enum | NavMode { Sphere, Cone, Zoom, Flyer, SmoothFlyer, ZoomTurn, ZoomShift, Pan, ElevateLookFixed, LookAround, MoveFocus, WheelZoom, Approach, Game, Jump, Plane, SmoothGlider, Ufo } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (NavMode) | |
| Defines the navigation metaphor currently used for transformation between mouse and camera motions. | |
| virtual void | setNavMode (NavMode mode) |
| Change the currently used navigation metaphor. | |
| NavMode | getNavMode () const |
| Get the currently used navigation metaphor. | |
| void | clearActiveNavigation () |
| void | setLookAt (LookAt *) |
| Assign a new LookAt object. | |
| LookAt * | getLookAt () const |
| Get a pointer to currently assigned LookAt object. | |
| VRS::Vector | getFocus () const |
| Returns the current focus point. | |
| virtual BehaviorNode::InvalidationHint | handle (Event *) |
| 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 void | storeCamera (const std::string &name) |
| virtual void | activateCamera (const std::string &name) |
| virtual void | removeCamera (const std::string &name) |
| virtual void | clearCameras () |
| virtual VRS::Iterator < std::string > * | cameraNames () const |
| virtual void | setConstraintChecker (ConstraintChecker *checker) |
| virtual ConstraintChecker * | getConstraintChecker () const |
| VRS_TYPEINFO (Navigation, Manipulator) | |
| VRS_SERIALIZABLE (Navigation) | |
Static Public Member Functions | |
| static SO< FilterTag > | getIgnoreFilterTag () |
| static SO< Navigation > | activeNavigation () |
| static void | setActiveNavigation (SO< Navigation > navigation) |
Protected Member Functions | |
| CameraMemento * | findCamera (const std::string &name) |
| void | addCamera (const std::string &name, CameraMemento *cm) |
| void | addCamera (const std::string &name, LookAt *lookAt) |
| Navigation (LookAt *lookAt=NULL, InputEvent::Button button=InputEvent::MouseButton1, InputEvent::Modifier must_modifier=InputEvent::NoModifier, InputEvent::Modifier must_not_modifier=InputEvent::NoModifier, Callback *startCallback=NULL, Callback *motionCallback=NULL, Callback *endCallback=NULL) | |
Static Protected Member Functions | |
| static SO< Filter > | getIgnoreFilter () |
Static Protected Attributes | |
| static SO< Navigation > | activeNavigation_ |
| VRS::Navigation::Navigation | ( | LookAt * | lookAt = NULL, |
|
| InputEvent::Button | button = InputEvent::MouseButton1, |
|||
| InputEvent::Modifier | must_modifier = InputEvent::NoModifier, |
|||
| InputEvent::Modifier | must_not_modifier = InputEvent::NoModifier, |
|||
| Callback * | startCallback = NULL, |
|||
| Callback * | motionCallback = NULL, |
|||
| Callback * | endCallback = NULL | |||
| ) | [protected] |
| VRS::Navigation::VRS_SERIALIZABLE_CLASS_ENUM | ( | NavMode | ) |
Defines the navigation metaphor currently used for transformation between mouse and camera motions.
Sphere - The camera is moved on the surface of a sphere centered around the focus, x-coordinate motions affect the longitude, y-coordinate motions affect latitude position of the camera. Cone - The camera can be moved on the mantle of a cone with the focus as the cone's top and the cone being axis parallel to the y-axis (0,1,0). y-coordinate motions affect the distance from focus, x-coordinate motions rotate the camera around an axis through the focus, parallel to (0,1,0). Flyer - The camera flies forward alongside the viewing direction while the mouse button is pressed with y-coordinate motions causing the virtual plane to lift/descend and x-coordinate motions change directions. ZoomTurn - y-coordinate motions move the camera forward and backwards, x-coordinate motions rotate the camera around an axis through the current position, parallel through (0,1,0). ZoomShift - y-coordinate motions move the camera forward and backwards, x-coordinate motions shift the camera around the terrain, both preserving the original direction of view. Pan - x- and y-coordinate mouse motions with buttons pressed cause a corresponding shift of the camera position to the left/right and up/down, leaving the original direction of view unchanged. ElevateLookFixed - allows to shift camera position left/right and up/down through corresponding x/y-coordinate mouse motions while preserving the original focus. LookAround - preserves the current camera position while shifting the camera view direction left/right and up/down by corresponding x/y-coordinate mouse motions. MoveFocus - allows to set the focus to any point in the scene by clicking on it using the mouse. WheelZoom - zooms in and out when the mouse wheel is activated (NOTE: use an arbitrary mouse button for this mode!).
| virtual void VRS::Navigation::setNavMode | ( | NavMode | mode | ) | [virtual] |
Change the currently used navigation metaphor.
Reimplemented in VRS::ApproachNavigation, VRS::JumpNavigation, and VRS::PlaneNavigation.
| Navigation::NavMode VRS::Navigation::getNavMode | ( | ) | const [inline] |
Get the currently used navigation metaphor.
Button motions can be used to change the look-to point, look-from point or the distance between look-to and look-from points. Navigation metaphors describe how this transformation is carried out. The currently used navigation metaphor, as element of the locally held NavMode enumeration, can be set and retrieved using this set of methods.
| void VRS::Navigation::clearActiveNavigation | ( | ) |
| VRS::Vector VRS::Navigation::getFocus | ( | ) | const |
Returns the current focus point.
| virtual BehaviorNode::InvalidationHint VRS::Navigation::handle | ( | Event * | ) | [virtual] |
An interaction process can receive and propagate canvas events. Other events are ignored. According to the conditions, `handle' triggers the start, process, end, and abort methods.
Reimplemented from VRS::Interaction.
Reimplemented in VRS::ApproachNavigation, VRS::GameNavigation, VRS::JumpNavigation, VRS::PathNavigation, VRS::PhysicalNavigation, VRS::PlaneNavigation, and VRS::UfoPhysicalNavigation.
| virtual BehaviorNode::InvalidationHint VRS::Navigation::dragStart | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | ||||
| ) | [virtual] |
Implements VRS::Manipulator.
Reimplemented in VRS::ApproachNavigation, VRS::GameNavigation, VRS::PhysicalNavigation, and VRS::PlaneNavigation.
| virtual BehaviorNode::InvalidationHint VRS::Navigation::dragMotion | ( | int | x, | |
| int | y, | |||
| MotionEvent * | ||||
| ) | [virtual] |
Implements VRS::Manipulator.
Reimplemented in VRS::ApproachNavigation, VRS::GameNavigation, VRS::PhysicalNavigation, and VRS::PlaneNavigation.
| virtual BehaviorNode::InvalidationHint VRS::Navigation::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).
Implements VRS::Manipulator.
Reimplemented in VRS::ApproachNavigation, VRS::GameNavigation, VRS::PhysicalNavigation, and VRS::PlaneNavigation.
| virtual void VRS::Navigation::storeCamera | ( | const std::string & | name | ) | [virtual] |
| virtual void VRS::Navigation::activateCamera | ( | const std::string & | name | ) | [virtual] |
| virtual void VRS::Navigation::removeCamera | ( | const std::string & | name | ) | [virtual] |
| virtual void VRS::Navigation::clearCameras | ( | ) | [virtual] |
| virtual VRS::Iterator<std::string>* VRS::Navigation::cameraNames | ( | ) | const [virtual] |
| virtual void VRS::Navigation::setConstraintChecker | ( | ConstraintChecker * | checker | ) | [virtual] |
| virtual ConstraintChecker* VRS::Navigation::getConstraintChecker | ( | ) | const [virtual] |
| static SO<Navigation> VRS::Navigation::activeNavigation | ( | ) | [static] |
| static void VRS::Navigation::setActiveNavigation | ( | SO< Navigation > | navigation | ) | [static] |
| VRS::Navigation::VRS_TYPEINFO | ( | Navigation | , | |
| Manipulator | ||||
| ) |
| VRS::Navigation::VRS_SERIALIZABLE | ( | Navigation | ) |
| CameraMemento* VRS::Navigation::findCamera | ( | const std::string & | name | ) | [protected] |
| void VRS::Navigation::addCamera | ( | const std::string & | name, | |
| CameraMemento * | cm | |||
| ) | [protected] |
| void VRS::Navigation::addCamera | ( | const std::string & | name, | |
| LookAt * | lookAt | |||
| ) | [protected] |
SO<Navigation> VRS::Navigation::activeNavigation_ [static, protected] |