OSG场景鼠标操作器关闭throw功能

https://tieba.baidu.com/p/5528158582?red_tag=2814227647

前几天在mac上配置好了osg,发现运行osgviewer范例时,鼠标滑动后cow会旋转,加入setAllowThrow false后可以关闭这个效果。晚上回家在ubuntu上试试。

// set up the camera manipulators.
    {
        osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
        osgGA::TrackballManipulator *trackBallManipulator= new osgGA::TrackballManipulator();
        trackBallManipulator->setAllowThrow(false);
        keyswitchManipulator->addMatrixManipulator( '1', "Trackball", trackBallManipulator );

......

猜你喜欢

转载自blog.csdn.net/tankweight/article/details/82492626