version 3.3

VRS::PathNavigation Class Reference

#include <vrs/sg/pathnavigation.h>

Inheritance diagram for VRS::PathNavigation:

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

List of all members.

Public Member Functions

 PathNavigation (Vector onPlane, LookAt *lookAt)
virtual ~PathNavigation ()
void setPath (Iterator< Vector > *keyPositions, Iterator< Vector > *keyDirections)
bool startPossible () const
void gotoStart ()
void startPath ()
bool playing ()
void setJumpNavigation (JumpNavigation *jumpNav)
void setSpeedParameters (double accel, double maxSpeed)
void setTangentLength (double tangentLength)
void enableKeys (unsigned char recordKey, unsigned char startKey, unsigned char clearKey)
void disableKeys ()
virtual
BehaviorNode::InvalidationHint 
handle (Event *)
void setLoopEnable (bool enabled)
void savePath (const std::string &fileName)
void loadPath (const std::string &fileName)
void enableLoadSaveKeys (const std::string &filename, unsigned char loadKey, unsigned char saveKey)
void disableLoadSaveKeys ()
 VRS_SERIALIZABLE (PathNavigation)
 VRS_TYPEINFO (PathNavigation, Navigation)


Detailed Description

PathNavigation is a simple camera path editing tool. It enables to record camera keypositions (more exactly camera positions and view directions) and creates an interpolated camera path.

Note: The PathNavigation needs an existing ground plane for the scene.


Constructor & Destructor Documentation

VRS::PathNavigation::PathNavigation ( Vector  onPlane,
LookAt lookAt 
)

Creates a PathNavigation. onPlane must be a point on the ground plane.

virtual VRS::PathNavigation::~PathNavigation (  )  [virtual]


Member Function Documentation

void VRS::PathNavigation::setPath ( Iterator< Vector > *  keyPositions,
Iterator< Vector > *  keyDirections 
)

Specifies keyPositions and keyDirections for the camera path. Both iterators must not be NULL and must be of equal length.

bool VRS::PathNavigation::startPossible (  )  const

A camera path start should be only initiated if the camera is already on the start position of the path (To ensure view-coherence). startPossible() checks the current view and determines, whether the path can be started.

void VRS::PathNavigation::gotoStart (  ) 

Moves the camera to the start position in order to make start possible.

void VRS::PathNavigation::startPath (  ) 

Invokes the camera path.

bool VRS::PathNavigation::playing (  ) 

A camera path is playing.

void VRS::PathNavigation::setJumpNavigation ( JumpNavigation jumpNav  ) 

The gotoStart() method uses a JumpNavigation that need be correctly configured for your scene. This method allows to specify an own JumpNavigation. jumpNav may be NULL. In this case gotoStart() sets the camera simply to the camera start position without smooth movement.

void VRS::PathNavigation::setSpeedParameters ( double  accel,
double  maxSpeed 
)

Configures the PathNavigation. accel specifies the acceleration in units per squared time cycle (50 time cycles per second). maxSpeed specifies the maximum allowed camera speed during the path in units per time cycle.

void VRS::PathNavigation::setTangentLength ( double  tangentLength  ) 

The camera paths contains of connected bezier curves. The lengths of these bezier curves are scale dependent and determines the appearance of the path: Choosing too long tangents result in larger deviation from the intended path and may cause unwanted loops, while too short tangents causes the camera to take the direction changes too hard.

void VRS::PathNavigation::enableKeys ( unsigned char  recordKey,
unsigned char  startKey,
unsigned char  clearKey 
)

Allows camera path creation and activation via control keys. With 'recordKey' the current view is recorded as keyframe. 'startKey' starts the camera path (if possible) or moves to the start position only. 'clearKey' clears the recorded path.

void VRS::PathNavigation::disableKeys (  ) 

Disables the control keys.

virtual BehaviorNode::InvalidationHint VRS::PathNavigation::handle ( Event  )  [virtual]

event handling

Reimplemented from VRS::Navigation.

void VRS::PathNavigation::setLoopEnable ( bool  enabled  ) 

If loops are enabled (default is false) a camera path is repeated after completion.

void VRS::PathNavigation::savePath ( const std::string &  fileName  ) 

void VRS::PathNavigation::loadPath ( const std::string &  fileName  ) 

Saves/Loads the recorded path in a simple ASCII file.

void VRS::PathNavigation::enableLoadSaveKeys ( const std::string &  filename,
unsigned char  loadKey,
unsigned char  saveKey 
)

void VRS::PathNavigation::disableLoadSaveKeys (  ) 

Allows to activate the loadPath/savePath methods per key

VRS::PathNavigation::VRS_SERIALIZABLE ( PathNavigation   ) 

VRS::PathNavigation::VRS_TYPEINFO ( PathNavigation  ,
Navigation   
)


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