|
楼主 |
发表于 2009-7-14 21:57:36
|
显示全部楼层
本帖最后由 湖面之舟 于 2009-7-14 21:58 编辑
加在回调中也不行,remove代码出错
- bool CKeyboardEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
- {
- if(double_view==true)//添加视图
- {
- osgGA::TrackballManipulator* Tman=new osgGA::TrackballManipulator();
- mOSG->createView(mOSG->mViewer,mOSG->mRoot1,mOSG->gc,Tman,0,0,400, 200, 2);
- double_view=false;
- }
- if(single_view==true)//删除视图
- {
- mOSG->getViewer()->removeView(mOSG->getViewer()->getView(1));
- }
- }
复制代码 |
|