osgEarth 2.1.1
Public Member Functions | Protected Attributes

anonymous_namespace{osgearth_manip.cpp}::SwitchHandler Class Reference

List of all members.

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

Detailed Description

Definition at line 40 of file osgearth_manip.cpp.


Constructor & Destructor Documentation

anonymous_namespace{osgearth_manip.cpp}::SwitchHandler::SwitchHandler ( char  key = 0) [inline]

Definition at line 43 of file osgearth_manip.cpp.

: _key(key) {}

Member Function Documentation

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;
        }

Here is the call graph for this function:


Member Data Documentation

char anonymous_namespace{osgearth_manip.cpp}::SwitchHandler::_key [protected]

Definition at line 60 of file osgearth_manip.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines