osgEarth 2.1.1
|
Public Member Functions | |
SwitchHandler (char key=0) | |
bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *object, osg::NodeVisitor *) |
Protected Attributes | |
char | _key |
Definition at line 40 of file osgearth_manip.cpp.
anonymous_namespace{osgearth_manip.cpp}::SwitchHandler::SwitchHandler | ( | char | key = 0 | ) | [inline] |
Definition at line 43 of file osgearth_manip.cpp.
: _key(key) {}
bool anonymous_namespace{osgearth_manip.cpp}::SwitchHandler::handle | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | aa, | ||
osg::Object * | object, | ||
osg::NodeVisitor * | |||
) | [inline] |
Definition at line 45 of file osgearth_manip.cpp.
{ if (ea.getHandled() || ea.getEventType() != osgGA::GUIEventAdapter::KEYDOWN ) return false; if ( ea.getKey() == _key ) { ControlCanvas* canvas = ControlCanvas::get(aa.asView()); if ( canvas ) canvas->setNodeMask( canvas->getNodeMask() ^ 0xFFFFFFFF ); } return false; }
char anonymous_namespace{osgearth_manip.cpp}::SwitchHandler::_key [protected] |
Definition at line 60 of file osgearth_manip.cpp.