OpenSceneGraph 2.8.4
Public Member Functions | Protected Attributes
osgViewer::RecordCameraPathHandler Class Reference

Event handler allowing the user to record the animation "path" of a camera. More...

Inheritance diagram for osgViewer::RecordCameraPathHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 RecordCameraPathHandler (const std::string &filename="saved_animation.path", float fps=25.0f)
void setKeyEventToggleRecord (int key)
int getKeyEventToggleRecord () const
void setKeyEventTogglePlayback (int key)
int getKeyEventTogglePlayback () const
void setAutoIncrementFilename (bool autoinc=true)
virtual void getUsage (osg::ApplicationUsage &usage) const
 Get the keyboard and mouse usage of this manipulator.
bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
 Deprecated, Handle events, return true if handled, false otherwise.

Protected Attributes

std::string _filename
int _autoinc
osgDB::ofstream _fout
int _keyEventToggleRecord
int _keyEventTogglePlayback
bool _currentlyRecording
bool _currentlyPlaying
double _interval
double _delta
osg::Timer_t _animStartTime
osg::Timer_t _lastFrameTime
osg::ref_ptr< osg::AnimationPath_animPath
osg::ref_ptr
< osgGA::AnimationPathManipulator
_animPathManipulator
osg::ref_ptr
< osgGA::MatrixManipulator
_oldManipulator

Detailed Description

Event handler allowing the user to record the animation "path" of a camera.

In it's current implementation, this handler cannot guarantee the final view matrix is correct; it is conceivable that the matrix may be one frame off. Eh--not a big deal! :) TODO: Write the file as we go, not when it's all done. TODO: Create an osgviewer on-screen indication that animation is taking place.


Constructor & Destructor Documentation

osgViewer::RecordCameraPathHandler::RecordCameraPathHandler ( const std::string &  filename = "saved_animation.path",
float  fps = 25.0f 
)

Member Function Documentation

int osgViewer::RecordCameraPathHandler::getKeyEventTogglePlayback ( ) const [inline]
int osgViewer::RecordCameraPathHandler::getKeyEventToggleRecord ( ) const [inline]
virtual void osgViewer::RecordCameraPathHandler::getUsage ( osg::ApplicationUsage ) const [virtual]

Get the keyboard and mouse usage of this manipulator.

Reimplemented from osgGA::GUIEventHandler.

bool osgViewer::RecordCameraPathHandler::handle ( const osgGA::GUIEventAdapter ,
osgGA::GUIActionAdapter  
) [virtual]

Deprecated, Handle events, return true if handled, false otherwise.

Reimplemented from osgGA::GUIEventHandler.

void osgViewer::RecordCameraPathHandler::setAutoIncrementFilename ( bool  autoinc = true) [inline]
void osgViewer::RecordCameraPathHandler::setKeyEventTogglePlayback ( int  key) [inline]
void osgViewer::RecordCameraPathHandler::setKeyEventToggleRecord ( int  key) [inline]

Member Data Documentation


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

osg logo
Generated at Sun Jan 8 2012 13:17:05 for the OpenSceneGraph by doxygen 1.7.4.