|
楼主 |
发表于 2010-8-12 10:11:31
|
显示全部楼层
3# FlySky
void cOSG::InitManipulators(void)
{
// Create a trackball manipulator 创建一个trackball操作器
trackball = new osgGA::TrackballManipulator();
// Create a Manipulator Switcher 创建一个KEY切换
keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
// Add our trackball manipulator to the switcher 加入KEY切换
keyswitchManipulator->addMatrixManipulator( '3', "Drive", trackball.get());
// Init the switcher to the first manipulator (in this case the only
能不能说详细一点啊?manipulator) 选择一个
keyswitchManipulator->selectMatrixManipulator(0); // Zero based index Value
}
mViewer->setCameraManipulator(keyswitchManipulator.get());
是这两段的原因吗??
能不能说详细点啊 |
|