version 3.3

VRS::ApproachNavigation Class Reference

#include <vrs/sg/approachnavigation.h>

Inheritance diagram for VRS::ApproachNavigation:

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

List of all members.

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)


Detailed Description

The ApproachNavigation creates smooth camera movements. If you select a specific Object on the screen, the focus is smoothly changed to that object and the camera accelerates from the current position in the direction of O.

Constructor & Destructor Documentation

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]


Member Function Documentation

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

Change the currently used navigation metaphor.

Reimplemented from VRS::Navigation.

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]

Event handling methods.

Reimplemented from VRS::Navigation.

VRS::ApproachNavigation::VRS_TYPEINFO ( ApproachNavigation  ,
Manipulator   
)


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

Generated on Fri May 18 06:00:26 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact