version 3.3

VRS::UndoNavigation Class Reference

The undo navigation allows to play the last few seconds of navigation backwards. More...

#include <vrs/sg/undonavigation.h>

Inheritance diagram for VRS::UndoNavigation:

VRS::InteractionTechnique VRS::SharedObj VRS::Visitable

List of all members.

Public Types

typedef VRS::Callback2< bool,
bool > 
UndoRedoAvailableCallback
 The first parameter means undo is possible or not, the second one regards redo.

Public Member Functions

 UndoNavigation (unsigned int memorySize=500)
void setMemorySize (unsigned int memorySize)
 The memory size specifies the maximum time for which the camera path is remembered.
unsigned int getMemorySize () const
void doUndo (bool on)
 Manually starts the undo (on==true) or stops it (on==false).
void doRedo (bool on)
 Manually starts the redo (on==true) or stops it (on==false).
void setUndoRedoAvailableCallback (SO< UndoRedoAvailableCallback > callback)
 Registers a callback triggered when undo or redo availablity has changed.
virtual void onTimer (SO< TimeEvent > event, double secondsSinceLastTimeEvent)
 If the InteractionTechnique is active (i.e.
virtual void onKey (SO< KeyEvent > event, KeyFunctionID id)
void onEventPassive (SO< Event > event, bool modeActive)
 Called for each event, even if the technique is inactive. (see interactiontechnique.h).
 VRS_TYPEINFO (UndoNavigation, InteractionTechnique)
 VRS_SERIALIZABLE (UndoNavigation)

Static Public Attributes

static const KeyFunctionID UndoKey
 see interactiontechnique.h
static const KeyFunctionID RedoKey

Classes

struct  Keyframe


Detailed Description

The undo navigation allows to play the last few seconds of navigation backwards.

For this, it stores the view parameters in regular time intervals and re-applys them to the lookat if desired. Waiting times more than 0.1 seconds are not stored.


Member Typedef Documentation

The first parameter means undo is possible or not, the second one regards redo.


Constructor & Destructor Documentation

VRS::UndoNavigation::UndoNavigation ( unsigned int  memorySize = 500  ) 


Member Function Documentation

void VRS::UndoNavigation::setMemorySize ( unsigned int  memorySize  ) 

The memory size specifies the maximum time for which the camera path is remembered.

50 units corresponds to 1 second. Actually, the memorySize is the buffer size for stored key frames, but since the minimum recording interval is 1/50 seconds, 50 units can store at least one second.

unsigned int VRS::UndoNavigation::getMemorySize (  )  const

void VRS::UndoNavigation::doUndo ( bool  on  ) 

Manually starts the undo (on==true) or stops it (on==false).

void VRS::UndoNavigation::doRedo ( bool  on  ) 

Manually starts the redo (on==true) or stops it (on==false).

void VRS::UndoNavigation::setUndoRedoAvailableCallback ( SO< UndoRedoAvailableCallback callback  ) 

Registers a callback triggered when undo or redo availablity has changed.

The first parameter means undo is possible or not, the second one regards redo

virtual void VRS::UndoNavigation::onTimer ( SO< TimeEvent event,
double  secondsSinceLastTimeEvent 
) [virtual]

If the InteractionTechnique is active (i.e.

has control of the view parameters) it receives user events and time events. The time event has a special meaning, because after the onTimer() call the current view parameters are finally applied. I.e. all view parameter states between two onTimer()-calls are not relevant. For convenience the time since the last time event is added, which could be alternatively calculated from the time event.

Reimplemented from VRS::InteractionTechnique.

virtual void VRS::UndoNavigation::onKey ( SO< KeyEvent event,
KeyFunctionID  id 
) [virtual]

void VRS::UndoNavigation::onEventPassive ( SO< Event event,
bool  modeActive 
) [virtual]

Called for each event, even if the technique is inactive. (see interactiontechnique.h).

Reimplemented from VRS::InteractionTechnique.

VRS::UndoNavigation::VRS_TYPEINFO ( UndoNavigation  ,
InteractionTechnique   
)

VRS::UndoNavigation::VRS_SERIALIZABLE ( UndoNavigation   ) 


Member Data Documentation


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

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