version 3.3

VRS::PlaneNavigation Class Reference

#include <vrs/sg/planenavigation.h>

Inheritance diagram for VRS::PlaneNavigation:

VRS::Navigation VRS::Manipulator VRS::Interaction VRS::LeafBehavior VRS::BehaviorNode VRS::SharedObj VRS::Visitable

List of all members.

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)


Detailed Description

PlaneNavigation enables to navigate parallel to a specified plane P via mouse. By control keys it is possible to change the distance of the camera from P or to "launch", i.e. to invoke a smooth transition from a given view (given by the associated LookAt) to a view looking down to P from a predefined height.

Constructor & Destructor Documentation

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.


Member Function Documentation

void VRS::PlaneNavigation::setNavMode ( Navigation::NavMode  mode  )  [virtual]

Change the currently used navigation metaphor.

Reimplemented from VRS::Navigation.

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]

Event handling methods.

Reimplemented from VRS::Navigation.

VRS::PlaneNavigation::VRS_TYPEINFO ( PlaneNavigation  ,
Manipulator   
)


The documentation for this class was generated from the following file:

Generated on Tue May 22 06:00:29 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact