OSG模拟鼠标事件影响操纵器

Posted coolbear

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OSG模拟鼠标事件影响操纵器相关的知识,希望对你有一定的参考价值。

viewer->getEventQueue()->mouseButtonPress(0,0,1);

viewer->getEventQueue()->mouseMotion(10,0);

以上代码模拟了鼠标左键从窗口(0,0)拖拽到窗口坐标(10,0)

 

viewer->getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN);

以上代码模拟了向上滚动滚轮

以上是关于OSG模拟鼠标事件影响操纵器的主要内容,如果未能解决你的问题,请参考以下文章