diff --git a/applications/osgviewer/osgviewer.cpp b/applications/osgviewer/osgviewer.cpp index f11c904a6..8dea45f36 100644 --- a/applications/osgviewer/osgviewer.cpp +++ b/applications/osgviewer/osgviewer.cpp @@ -117,8 +117,8 @@ int main(int argc, char** argv) // add the help handler viewer.addEventHandler(new osgViewer::HelpHandler(arguments.getApplicationUsage())); - // add the camera path handler - viewer.addEventHandler(new osgViewer::AnimationPathHandler); + // add the record camera path handler + viewer.addEventHandler(new osgViewer::RecordCameraPathHandler); while (arguments.read("--SingleThreaded")) viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); while (arguments.read("--CullDrawThreadPerContext")) viewer.setThreadingModel(osgViewer::Viewer::CullDrawThreadPerContext); diff --git a/include/osgViewer/ViewerEventHandlers b/include/osgViewer/ViewerEventHandlers index 05884f2a3..0fe8ad479 100644 --- a/include/osgViewer/ViewerEventHandlers +++ b/include/osgViewer/ViewerEventHandlers @@ -113,11 +113,11 @@ TODO: Create osgviewer on-screen indication that animation is taking place. TODO: Explore multi-cameras thing. TODO: Investigate crash if non-focused camera? */ -class AnimationPathHandler : public osgGA::GUIEventHandler +class RecordCameraPathHandler : public osgGA::GUIEventHandler { public: - AnimationPathHandler(); + RecordCameraPathHandler(); virtual void getUsage(osg::ApplicationUsage &usage) const; diff --git a/src/osgViewer/ViewerEventHandlers.cpp b/src/osgViewer/ViewerEventHandlers.cpp index 0ca59df48..86c0fde88 100644 --- a/src/osgViewer/ViewerEventHandlers.cpp +++ b/src/osgViewer/ViewerEventHandlers.cpp @@ -343,7 +343,7 @@ bool ThreadingHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIAction return false; } -AnimationPathHandler::AnimationPathHandler(): +RecordCameraPathHandler::RecordCameraPathHandler(): _currentlyRecording(false), _delta(0.0f), _lastFrameTime(osg::Timer::instance()->tick()), @@ -358,12 +358,12 @@ AnimationPathHandler::AnimationPathHandler(): else _interval = 1.0f / 25.0f; } -void AnimationPathHandler::getUsage(osg::ApplicationUsage &usage) const +void RecordCameraPathHandler::getUsage(osg::ApplicationUsage &usage) const { usage.addKeyboardMouseBinding("z", "Toggle camera path recording."); } -bool AnimationPathHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) +bool RecordCameraPathHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) { osgViewer::Viewer* viewer = dynamic_cast(&aa);