OSG addEventHandler W键显示网格 L键控制光照 F键切换全屏窗口 S键显示统计数据 事件处理器

#include <osgGA/StateSetManipulator>

#include <osgViewer/ViewerEventHandlers>

// add the state manipulator显示统计数据W键显示网格 L键控制光照
    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 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);

posted @ 2014-05-12 14:22  酷熊  阅读(2131)  评论(0编辑  收藏  举报