添加OSG各种事件处理器

// add the state manipulator
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );

// add the thread model handler
viewer.addEventHandler(new osgViewer::ThreadingHandler);

// add the window size toggle handler
viewer.addEventHandler(new osgViewer::WindowSizeHandler);

// add the stats handler
viewer.addEventHandler(new osgViewer::StatsHandler);

// add the help handler
viewer.addEventHandler(new osgViewer::HelpHandler(arguments.getApplicationUsage()));

// add the record camera path handler
viewer.addEventHandler(new osgViewer::RecordCameraPathHandler);

// add the LOD Scale handler
viewer.addEventHandler(new osgViewer::LODScaleHandler);

// add the screen capture handler
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);

上一篇:.NET(C#):XML序列化时派生类的处理


下一篇:MySQL工具汇总