- Timestamp:
- 12/14/10 21:07:41 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osganalysis/osganalysis.cpp
r12033 r12035 468 468 469 469 }; 470 470 // 471 471 class DatabasePagingOperation : public osg::Operation, public osgUtil::IncrementalCompileOperation::CompileCompletedCallback 472 472 { … … 560 560 }; 561 561 562 struct ReportStatsAnimationCompletedCallback : public osgGA::AnimationPathManipulator::AnimationCompletedCallback 563 { 564 virtual void completed(const osgGA::AnimationPathManipulator*) 565 { 566 OSG_NOTICE<<"Animation completed"<<std::endl; 567 osg::Texture::getTextureObjectManager(0)->reportStats(osg::notify(osg::NOTICE)); 568 osg::GLBufferObjectManager::getGLBufferObjectManager(0)->reportStats(osg::notify(osg::NOTICE)); 569 } 570 }; 562 571 563 572 int main(int argc, char** argv) … … 577 586 keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() ); 578 587 588 char keyForAnimationPath = '8'; 589 double animationSpeed = 1.0; 590 while(arguments.read("--speed",animationSpeed) ) {} 591 579 592 std::string pathfile; 580 char keyForAnimationPath = '8';581 593 while (arguments.read("-p",pathfile)) 582 594 { … … 584 596 if (apm || !apm->valid()) 585 597 { 598 apm->setTimeScale(animationSpeed); 599 apm->setAnimationCompletedCallback(new ReportStatsAnimationCompletedCallback()); 600 586 601 unsigned int num = keyswitchManipulator->getNumMatrixManipulators(); 587 602 keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
