Added --update-active and --update-all command line options that set the UpdateVisitor::TraversalMode to TRAVERSE_ACTIVE_CHILDREN and TRAVERSE_ALL_CHILDREN respecively.

This commit is contained in:
Robert Osfield
2012-11-13 15:26:06 +00:00
parent 057f8a8b3b
commit e70ece8f10

View File

@@ -537,6 +537,10 @@ int main( int argc, char **argv )
while (arguments.read("--loop")) loopPresentation = true;
while(arguments.read("--update-active")) viewer.getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN);
while(arguments.read("--update-all")) viewer.getUpdateVisitor()->setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);
// register the slide event handler - which moves the presentation from slide to slide, layer to layer.
osg::ref_ptr<osgPresentation::SlideEventHandler> seh = new osgPresentation::SlideEventHandler(&viewer);
viewer.addEventHandler(seh.get());