osg事件处理器osgGA::GUIEventHandler handle

bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)

   {

       osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>(&aa);

}

bool ControlMan::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
{

        osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>(&aa);//Pick
        switch(ea.getEventType())
        {
        case osgGA::GUIEventAdapter::KEYDOWN:
                {
                        switch(ea.getKey())
                        {
                        case 'w':
                                {return true;
                                }
                        case 's':
                                {
                                        return true;

                                }
                        }
                }
        }

        return false;
}

 

posted @ 2014-05-27 10:52  酷熊  阅读(3698)  评论(0编辑  收藏  举报