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

Public Member Functions | |
| PhysicalNavigation (LookAt *lookAt, InputEvent::Button button=InputEvent::MouseButton1, InputEvent::Modifier must_modifier=InputEvent::NoModifier, InputEvent::Modifier must_not_modifier=InputEvent::NoModifier, double meterDefinition=1.0, FilterTag *filterTag=NULL, Vector gravitationDir=Vector(0.0,-1.0, 0.0), PhysicalForce::ForceMode forceMode=PhysicalForce::Spring) | |
| double | getMeterDefinition () const |
| virtual void | setMeterDefinition (double) |
| Vector | getCurrentVelocity () const |
| float | getViscosity () const |
| void | setViscosity (float) |
| void | setSlowDownControlEnabled (bool) |
| bool | slowDownControlEnabled () |
| virtual | ~PhysicalNavigation () |
| Destructor. | |
| VRS_TYPEINFO (PhysicalNavigation, Navigation) | |
| VRS_SERIALIZABLE_ABSTRACT_CLASS (PhysicalNavigation) | |
Protected Types | |
| enum | SlowDownControlState { SDC_DEACTIVATED, SDC_TURNON, SDC_TURNOFF } |
Protected Member Functions | |
| virtual void | translateInteractionIntoTargetPos (Vector &target, Vector &dir, float x, float y, double time_now, double time_lastCalc)=0 |
| virtual bool | validateTargetPosition (Vector &target, const Vector &oldTarget, const Vector &dir) |
| virtual void | updateLookAt (const Vector &pos, const Vector &dir) |
| virtual BehaviorNode::InvalidationHint | processKeyEvent (KeyEvent *) |
| virtual void | storeInitialInteractionParams (int x, int y, ButtonEvent *) |
| virtual void | storeCurrentInteractionParams (int x, int y, MotionEvent *) |
| virtual BehaviorNode::InvalidationHint | wakeUpNavigation () |
| virtual bool | keyCanWakeUpNavigation (KeyEvent *) |
| virtual void | initPhysicalNavigation (const Vector &) |
| virtual bool | detectCollisionPoint (Vector &collisionPoint, const Vector &pos, const Vector &dir) |
| virtual bool | detectGroundPoint (Vector &groundPoint, const Vector &pos) |
| virtual bool | detectHeight (float &height, const Vector &pos) |
| VRS_SERIALIZABLE_CLASS_ENUM (SlowDownControlState) | |
| virtual BehaviorNode::InvalidationHint | dragStart (int x, int y, ButtonEvent *) |
| Event handling method if the mouse button is pressed. | |
| virtual BehaviorNode::InvalidationHint | dragMotion (int x, int y, MotionEvent *) |
| Event handling method if the mouse is moved while the button is pressed. | |
| virtual BehaviorNode::InvalidationHint | dragEnd (int x, int y, ButtonEvent *) |
| Event handling method if the mouse button is released. | |
| virtual BehaviorNode::InvalidationHint | handle (Event *) |
| Event handling method, all events are first processed in handle(). | |
| PhysicalNavigation () | |
Protected Attributes | |
| float | meterDefinition_ |
| Vector | position_ |
| Vector | velocity_ |
| Vector | acceleration_ |
| Position, velocity and acceleration of the camera. | |
| Vector | d_position_ |
| Vector | d_velocity_ |
| Vector | d_acceleration_ |
| Numerically calculated changes of pos, vel and acc of the camera. Obtained by solving the physical motion equations. | |
| Vector | target_ |
| Position of the target. | |
| Vector | direction_ |
| Viewing/Flighing direction of the camera. Should have a length of 1.0;. | |
| SO< FilterTag > | filterTag_ |
| Vector | gravitationDir_ |
| Canvas * | canvas_ |
| The canvas, in which the events are created. canvas_ is set when the user presses the mouse button (dragStart()). | |
| bool | forceCalculation_ |
| bool | navigationIsSleeping_ |
The interaction functionality is defined by overiding the virtual methods listed below:
PhysicalNavigation provides methods for detecting collisions with a scene geometry which can be used by the derived classes of PhysicalNavigation:
To make the expression height meaningfull, a gravitation direction is defined. With this "under" a position makes sens. Note that this gravitation has no effect on the physical motion equations. To confine what is regarded as ground terrain a filter tag can be used to tag all scene geometries which add up to the ground terrain. Without using a tag, the ground terrain is defined by the sum of all scene geometries.
The operating physical force which defines the physical behavior of the navigation set by a passed parameter to the constructor. Possible values are defined in the enum ForceMode in PhysicalForce. For each forceMode exists a class, derived from PhysicalForce, which provides the method calcforceDifferential(). PhysicalNavigation holds an instance of a PhysicalForce as a member variable. See below: Question 2.
Now some important questions will be answered: 1. What is the physical situation which is described by the model? 2. Wow is the force defined? 3. How is the conversion of world coordinates to the coordinates of the physical model? 4. Which abstract methods have to be implemented? 5. Which methods can be implemented to provide functionality? 6. Is there a special behavior when the user stops interacting, i.e. when the mouse button is released? 7. What is the internal process when the user interacts?
------------------------------------------------------------------------------------------------------------------------------------------ 1. What is the physical situation which is described by the model? ------------------------------------------------------------------------------------------------------------------------------------------ A good analogy to explain the physical model is the image of a donkey which has a carrot in front of his head. The donkey tries to get the carrot and thus moves forward. The movements of the donkey can be manipulated by setting the carrot's position. This is what happens in a physical navigation metaphor: The user controls a target by mouse or keyboard interactions. Between the target and the camera is acting a virtual force. This force makes the camera to follow the target. In that way the user controls the camera position only indirectly in two steps.
The motion equations of the physical model are solved in the method: void solveMotionEquations(Vector& delta_pos, Vector& delta_vel, Vector& delta_acc, const Vector& pos, const Vector& pos, const Vector& pos, const Vector& targetPos, const Vector& d_targetPos, float timestep) It calculates the changes of the camera's position, velocity and acceleration by the given values:
PhysicalNavigation also takes a viscous liquid into account, in which the camera is situated. This extension is made to prevent the camera oscillating around the target. In a viscous liquid (e.g. honey) the moving camera experiences friction. The camera looses energy while moving. Thats why it won't oscillate infinitely around the target, but will swing into the target position. With high values of viscosity the camera won't even do a single oscillation but will move slowly and directly into the target position. The force of the friction (Stokes friction) has the mathematical form of: F(friction) = -D * cameraVelocity; D is a factor of proportionality.
The force of inertia, which is always taken into account in physical models where a mass is assigned to the camera, is described mathematically: F(inertia) = mass * cameraAcceleration
Newton's law says that the sum of all interacting forces is zero, i.e. F(inertia) + F(friction) + F(targetforce) = 0
With the fact that
d(cameraPosition)/dt = cameraVelocity d(cameraVelocity)/dt = cameraAcceleration d(cameraAcceleration)/dt = (1/mass) * ( d(F(targetforce)) / dt
To solve this motion equations numerically in timesteps of timeIntervall, another form can be used:
d_cameraPosition = timeIntervall * cameraVelocity d_cameraVelocity = timeIntervall * cameraAcceleration d_cameraAcceleration = (1/mass) * ( d(F(targetforce))
The differential d(F(targetforce)) is obtained by a method of the PhysicalForce-object:
Vector& calcforceDifferential(const Vector& cameraPos, const Vector& targetPos, const Vector& d_cameraPos, const Vector& d_targetPos)
In the next section it is described how to derive a PhysicalForce class and implement this virtual method.
------------------------------------------------------------------------------------------------------------------------------------------ 2. Wow is the force defined? ------------------------------------------------------------------------------------------------------------------------------------------ The force between the target and the camera is defined by the PhysicalForce-object. Dervived classes of PhysicalNavigation will set a valid PhysicalForce object in their constructor by using the setPhysicalForce() method. If not a dummy force with no functionality is used.
The PhysicalForce class provides the method: Vector& calcTargetforceDifferential(const Vector& cameraPos, const Vector& targetPos, const Vector& d_cameraPos, const Vector& d_targetPos) Derived classes from PhysicalForce implement different forces implicit by defining the differential.
The way how a differential is obtained by a given function is explained now by means of examples. --------------------- example: spring force --------------------- F(springForce) = S * (targetPos - cameraPos)
dF/dt = S * ( d(targetPos)/dt - d(cameraPos)/dt )
The differential dF is therefore: dF = S * ( d(targetPos) - d(cameraPos) )
--------------------- example: gravitation force --------------------- F(gravitationForce) = (targetPos-cameraPos).normalized * G * (1 / (targetPos-cameraPos)^2)
dF/dt = -(targetPos-cameraPos).normalized * G * (1 / abs(targetPos-cameraPos)) * ( d(targetPos)/dt - d(cameraPos)/dt )
The differential dF is therefore: dF = -(targetPos-cameraPos).normalized * G * (1 / abs(targetPos-cameraPos)) * ( d(targetPos) - d(cameraPos) )
------------------------------------------------------------------------------------------------------------------------------------------ 3. How is the conversion of world coordinates to the coordinates of the physical model? ------------------------------------------------------------------------------------------------------------------------------------------ The physical model works in an own coordination system. So position, velocity and accelleration of the camera and also the target position are described in the physical coordination system. To convert values described in physical coordinations to world coordination, the meter definition is used. With the setMeterDefinition() method it is defined what distance in world coordinates correspond to 1m in physical coords. The meter definition is used to adjust the physical behavior to the given scene geometry. The meter definition is especially important for derived classes of PhysicalNavigation for adjusting the flying speed to a given scene geometry. For a wide streched-out scene geometry it is more sugegestive to adapt the meter definition than to increase the speed of the navigation. With a speed of the camera which is abnormal fast in terms of physical coordinations the physical model tends to create an unusual behavior, i.e. oscillations of the camera around the target cannot be controlled easily. Important: Use the meter definition to adapt the physical model to the scene geometry. Be aware of an abnormal high speed of the camera.
------------------------------------------------------------------------------------------------------------------------------------------ 4. Which abstract methods have to be implemented? ------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------ translateUserInteractionIntoTargetPos() ------------------------------------------ This method converts the mouse position and to the new target position.
------------------------------------------------------------------------------------------------------------------------------------------ 5. Which methods can be implemented to provide functionality? ------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------ validateTargetPosition() ------------------------------------------ Checks if the target position is valid. For navigations which are interacting with the scene geometry this method is interesting, because here you can change for example the height of the target in respect to a given terrain.
------------------------------------------------------------------------------------------------------------------------------------------ 6. Is there a special behavior when the user stops interacting, i.e. when the mouse button is released? ------------------------------------------------------------------------------------------------------------------------------------------ Yes, when the user releases the mouse button, he/she normally wants the camera to stand still because he/she reached the destination. In a PhysicalNavigation the user just stopped changing the target's position. The camera moves like the physical motion equations say. That means the camera has not reached it's destination yet. The camera will move on untill it reached the virtual target. To avoid the camera moving on, a special feature, a slow down control, has been bild in. The functionality is explained now: The slowDownControl has three possible states:
While the state is 'deactivated' the slowDownControl has nothing to do.
When the user stops his/her interactions the state of the slowDownControl is set to 'turnOn'. This is done in the method dragEnd(). In the 'turnOn'-state the viscosity of the liquid, i.e. the friction which is experienced by the camera, is set to a rather high value. This change in friction is considered during the calculation of the physical motion equation to keep the motion equations consistent. Furthermore the target is put closer to the actual camera position. After the calculation with these special value of viscosity the state is set to 'turnOff'.
In the 'turnOff' state the value of viscosity is set to it's original value. This change is considered during the calculation of the physical motion equations. Now the state is set to 'deactivated'.
Note: With the method enableSlowDownControl(bool) the slow down control can be enabled (true) or disabled (false).
The slow down control functionality is implemented in solveMotionEquations().
------------------------------------------------------------------------------------------------------------------------------------------ 7. What is the internal process when the user interacts? ------------------------------------------------------------------------------------------------------------------------------------------ After creating an instance of a derived class from PhysicalNavigation the navigation object is in a sleeping state. A mouseclick wakes it up (dragStart()). The initial interaction parameters are stored (mouse position) and the navigation is initialized.
Now it is in a waiting state. It reacts on the following events:
mouseMotion:
mouseButtonReleased:
mouseClick:
time event:
enum VRS::PhysicalNavigation::SlowDownControlState [protected] |
| VRS::PhysicalNavigation::PhysicalNavigation | ( | LookAt * | lookAt, | |
| InputEvent::Button | button = InputEvent::MouseButton1, |
|||
| InputEvent::Modifier | must_modifier = InputEvent::NoModifier, |
|||
| InputEvent::Modifier | must_not_modifier = InputEvent::NoModifier, |
|||
| double | meterDefinition = 1.0, |
|||
| FilterTag * | filterTag = NULL, |
|||
| Vector | gravitationDir = Vector(0.0,-1.0, 0.0), |
|||
| PhysicalForce::ForceMode | forceMode = PhysicalForce::Spring | |||
| ) |
'lookAt': specifies the LookAt object the Navigation is assigned to. 'target' must not be NULL. 'button': specifies the mouse button that have to be pressed to use the Navigation. 'must_modifier': if must_modifier is not InputEvent::NoModifier, the navigation processes mouse events only if the must_modifier key is hold down. 'must_not_modifier': if must_not_modifier is not InputEvent::NoModifier, the navigation processes mouse events only if the must_not_modifier key is not hold down. 'meterDefinition': The physical model works in an own coordination system. So position, velocity and accelleration of the camera and also the target position are described in the physical coordination system. To convert values described in physical coordinations to world coordination, the meter definition is used. Important: Use the meter definition to adapt the physical model to the scene geometry. Be aware of an abnormal high speed of the camera. meterDefinition > 0; default: 1.0 'filterTag': A filter tag is passed as parameter to define which scene objects are regarded as ground terrain. Without filter tag all scene objects define the ground terrain. 'gravitationDir': Defines the direction of the gravitation, e.g. it defines what "under" an object means. gravitationDir is essential for a reasonable definition of "height". 'forceMode' : The operating physical force which defines the physical behavior of the navigation set by a passed parameter to the constructor. Possible values are defined in the enum ForceMode in PhysicalForce. For each forceMode exists a class, derived from PhysicalForce, which provides the method calcforceDifferential(). PhysicalNavigation holds an instance of a PhysicalForce as a member variable. See above: Question 2.
| virtual VRS::PhysicalNavigation::~PhysicalNavigation | ( | ) | [virtual] |
Destructor.
| VRS::PhysicalNavigation::PhysicalNavigation | ( | ) | [inline, protected] |
| double VRS::PhysicalNavigation::getMeterDefinition | ( | ) | const [inline] |
The physical model works in an own coordination system. So position, velocity and accelleration of the camera and also the target position are described in the physical coordination system. To convert values described in physical coordinations to world coordination, the meter definition is used. Important: Use the meter definition to adapt the physical model to the scene geometry. Be aware of an abnormal high speed of the camera. meterDefinition_ > 0; default: 1.0
| virtual void VRS::PhysicalNavigation::setMeterDefinition | ( | double | ) | [virtual] |
The physical model works in an own coordination system. So position, velocity and accelleration of the camera and also the target position are described in the physical coordination system. To convert values described in physical coordinations to world coordination, the meter definition is used. Important: Use the meter definition to adapt the physical model to the scene geometry. Be aware of an abnormal high speed of the camera. meterDefinition_ > 0; default: 1.0
| Vector VRS::PhysicalNavigation::getCurrentVelocity | ( | ) | const |
Returns the current velocity of the camera described in world coordinates.
| float VRS::PhysicalNavigation::getViscosity | ( | ) | const [inline] |
PhysicalNavigation also takes a viscous liquid into account, in which the camera is situated. This extension is made to prevent the camera oscillating around the target. In a viscous liquid (e.g. honey) the moving camera experiences friction. The camera looses energy while moving. That's why it won't oscillate infinitely around the target, but will swing into the target position. With high values of viscosity the camera won't even do a single oscillation but will move slowly and directly into the target position. viscosity_ >= 0; default: 1.5
| void VRS::PhysicalNavigation::setViscosity | ( | float | ) |
PhysicalNavigation also takes a viscous liquid into account, in which the camera is situated. This extension is made to prevent the camera oscillating around the target. In a viscous liquid (e.g. honey) the moving camera experiences friction. The camera looses energy while moving. That's why it won't oscillate infinitely around the target, but will swing into the target position. With high values of viscosity the camera won't even do a single oscillation but will move slowly and directly into the target position. viscosity_ >= 0; default: 1.5
| void VRS::PhysicalNavigation::setSlowDownControlEnabled | ( | bool | ) |
When the user releases the mouse button, he/she normally wants the camera to stand still because he/she reached the destination. In a PhysicalNavigation the user just stopped changing the target's position. The camera moves like the physical motion equations say. That means the camera has not reached it's destination yet. The camera will move on untill it reached the virtual target. To avoid the camera moving on, a special feature, a slow down control, has been bild in.
| bool VRS::PhysicalNavigation::slowDownControlEnabled | ( | ) | [inline] |
When the user releases the mouse button, he/she normally wants the camera to stand still because he/she reached the destination. In a PhysicalNavigation the user just stopped changing the target's position. The camera moves like the physical motion equations say. That means the camera has not reached it's destination yet. The camera will move on untill it reached the virtual target. To avoid the camera moving on, a special feature, a slow down control, has been bild in.
| VRS::PhysicalNavigation::VRS_TYPEINFO | ( | PhysicalNavigation | , | |
| Navigation | ||||
| ) |
| VRS::PhysicalNavigation::VRS_SERIALIZABLE_ABSTRACT_CLASS | ( | PhysicalNavigation | ) |
| virtual void VRS::PhysicalNavigation::translateInteractionIntoTargetPos | ( | Vector & | target, | |
| Vector & | dir, | |||
| float | x, | |||
| float | y, | |||
| double | time_now, | |||
| double | time_lastCalc | |||
| ) | [protected, pure virtual] |
This abstract method defines how the user controls the navigation. x and y are the normalized mouse position (in respect to the first click point and the window size). This method sets the new target position and the viewing/flight direction.
Implemented in VRS::FlyerPhysicalNavigation, and VRS::UfoPhysicalNavigation.
| virtual bool VRS::PhysicalNavigation::validateTargetPosition | ( | Vector & | target, | |
| const Vector & | oldTarget, | |||
| const Vector & | dir | |||
| ) | [protected, virtual] |
Derived classes use validateTargetPosition() to check if the target has a valid position, e.g. if it is over a minimum height over a given terrain. If the target is invalid and changed it returns false else true.
Reimplemented in VRS::FlyerPhysicalNavigation, and VRS::UfoPhysicalNavigation.
| virtual void VRS::PhysicalNavigation::updateLookAt | ( | const Vector & | pos, | |
| const Vector & | dir | |||
| ) | [protected, virtual] |
The lookAt is updated. The From-Vector is set to pos, the To-Vector is set to pos+dir. A conversion between physical coordinations and world coordinations is taken into account.
Reimplemented in VRS::UfoPhysicalNavigation.
| virtual BehaviorNode::InvalidationHint VRS::PhysicalNavigation::processKeyEvent | ( | KeyEvent * | ) | [protected, virtual] |
If handle() gets a KeyEvent processKeyEvent() will process it. This is usefull for derived classes which consider keyboard interactions.
Reimplemented in VRS::FlyerPhysicalNavigation, and VRS::UfoPhysicalNavigation.
| virtual void VRS::PhysicalNavigation::storeInitialInteractionParams | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | ||||
| ) | [protected, virtual] |
This method is called when the user presses the mouse button. The current mouse position is stored in the referenceMousePos member variables. The ButtonEvent is passed, if a derived class needs to consider a key modifier during the mouse click.
| virtual void VRS::PhysicalNavigation::storeCurrentInteractionParams | ( | int | x, | |
| int | y, | |||
| MotionEvent * | ||||
| ) | [protected, virtual] |
This method is called when the user moves the mouse while the mouse button is pressed. The current mouse position is stored in the currentMousePos member variables. The MotionEvent is passed to get the current canvas. Note: MotionEvents don't consider additional pressed key modifiers.
| virtual BehaviorNode::InvalidationHint VRS::PhysicalNavigation::wakeUpNavigation | ( | ) | [protected, virtual] |
This method is called in dragStart() if the navigation is in the sleeping state, i.e. the camera is not in motion, or if another navigation object took control, i.e. activeNavigation_!=this . wakeUpNavigation() sets navigationIsSleeping_ and activeNavigation_, initializes the physical motion equations and updates the lookAt.
| virtual bool VRS::PhysicalNavigation::keyCanWakeUpNavigation | ( | KeyEvent * | ) | [protected, virtual] |
Defines the keys which can wake up the navigation.
Reimplemented in VRS::UfoPhysicalNavigation.
| virtual void VRS::PhysicalNavigation::initPhysicalNavigation | ( | const Vector & | ) | [protected, virtual] |
This method initializes the camera's position to the given parameter. It also sets velocity, acceleration and all delta-values (d_position, d_velocity, d_acceleration) to zero. Furthermore the slow down control is deactivated.
Reimplemented in VRS::UfoPhysicalNavigation.
| virtual bool VRS::PhysicalNavigation::detectCollisionPoint | ( | Vector & | collisionPoint, | |
| const Vector & | pos, | |||
| const Vector & | dir | |||
| ) | [protected, virtual] |
Detects collision of a ray, defined by position and direction, with the scene geometry. If a filter tag has been set, only tagged scene geometries are tested. If a collision point is found detectCollisionPoint() returns true and sets collisionPoint. Otherwise it returns false.
| virtual bool VRS::PhysicalNavigation::detectGroundPoint | ( | Vector & | groundPoint, | |
| const Vector & | pos | |||
| ) | [protected, virtual] |
Detects the ground point "under" the given position. Under means in respect to the gravitaion direction. The ground point is passed as reference and true is returned. If no ground point is found, detectGroundPoint() returns false.
| virtual bool VRS::PhysicalNavigation::detectHeight | ( | float & | height, | |
| const Vector & | pos | |||
| ) | [protected, virtual] |
Detects the height of a given position in respect to the gravitation direction. If there is no ground point, detectHeight() returns false, otherwise true.
| VRS::PhysicalNavigation::VRS_SERIALIZABLE_CLASS_ENUM | ( | SlowDownControlState | ) | [protected] |
| virtual BehaviorNode::InvalidationHint VRS::PhysicalNavigation::dragStart | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | ||||
| ) | [protected, virtual] |
| virtual BehaviorNode::InvalidationHint VRS::PhysicalNavigation::dragMotion | ( | int | x, | |
| int | y, | |||
| MotionEvent * | ||||
| ) | [protected, virtual] |
Event handling method if the mouse is moved while the button is pressed.
Reimplemented from VRS::Navigation.
| virtual BehaviorNode::InvalidationHint VRS::PhysicalNavigation::dragEnd | ( | int | x, | |
| int | y, | |||
| ButtonEvent * | ||||
| ) | [protected, virtual] |
| virtual BehaviorNode::InvalidationHint VRS::PhysicalNavigation::handle | ( | Event * | ) | [protected, virtual] |
Event handling method, all events are first processed in handle().
Reimplemented from VRS::Navigation.
Reimplemented in VRS::UfoPhysicalNavigation.
float VRS::PhysicalNavigation::meterDefinition_ [protected] |
meter definition The physical model works in an own coordination system. So position, velocity and accelleration of the camera and also the target position are described in the physical coordination system. To convert values described in physical coordinations to world coordination, the meter definition is used. meterDefinition_ > 0; default: 1.0
Vector VRS::PhysicalNavigation::position_ [protected] |
Vector VRS::PhysicalNavigation::velocity_ [protected] |
Vector VRS::PhysicalNavigation::acceleration_ [protected] |
Position, velocity and acceleration of the camera.
Vector VRS::PhysicalNavigation::d_position_ [protected] |
Vector VRS::PhysicalNavigation::d_velocity_ [protected] |
Vector VRS::PhysicalNavigation::d_acceleration_ [protected] |
Numerically calculated changes of pos, vel and acc of the camera. Obtained by solving the physical motion equations.
Vector VRS::PhysicalNavigation::target_ [protected] |
Position of the target.
Vector VRS::PhysicalNavigation::direction_ [protected] |
Viewing/Flighing direction of the camera. Should have a length of 1.0;.
SO<FilterTag> VRS::PhysicalNavigation::filterTag_ [protected] |
Vector VRS::PhysicalNavigation::gravitationDir_ [protected] |
Canvas* VRS::PhysicalNavigation::canvas_ [protected] |
The canvas, in which the events are created. canvas_ is set when the user presses the mouse button (dragStart()).
bool VRS::PhysicalNavigation::forceCalculation_ [protected] |
Is used if a key needs to wake up the navigation.
bool VRS::PhysicalNavigation::navigationIsSleeping_ [protected] |
Flag indicating if the camera is in motion, i.e. if the motion equations still have to be solved. This is particularly the case after the user released the mouse button. Only after a a timeout the navigation returns to its sleeping state. Therefore this flag is not corresponding to the flag returned by started().