viewer->getEventQueue()->mouseButtonPress(0,0,1);
viewer->getEventQueue()->mouseMotion(10,0);
以上代码模拟了鼠标左键从窗口(0,0)拖拽到窗口坐标(10,0)
viewer->getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN);
以上代码模拟了向上滚动滚轮
viewer->getEventQueue()->mouseButtonPress(0,0,1);
viewer->getEventQueue()->mouseMotion(10,0);
以上代码模拟了鼠标左键从窗口(0,0)拖拽到窗口坐标(10,0)
viewer->getEventQueue()->mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN);
以上代码模拟了向上滚动滚轮