osgEarth 2.1.1
Public Member Functions | Public Attributes

anonymous_namespace{osgearth_manip.cpp}::LockAzimuthHandler Struct Reference

List of all members.

Public Member Functions

 LockAzimuthHandler (char key, EarthManipulator *manip)
bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
void getUsage (osg::ApplicationUsage &usage) const

Public Attributes

char _key
osg::ref_ptr< EarthManipulator_manip

Detailed Description

Definition at line 115 of file osgearth_manip.cpp.


Constructor & Destructor Documentation

anonymous_namespace{osgearth_manip.cpp}::LockAzimuthHandler::LockAzimuthHandler ( char  key,
EarthManipulator manip 
) [inline]

Definition at line 117 of file osgearth_manip.cpp.

            : _key(key), _manip(manip)
        {
        }

Member Function Documentation

void anonymous_namespace{osgearth_manip.cpp}::LockAzimuthHandler::getUsage ( osg::ApplicationUsage &  usage) const [inline]

Definition at line 134 of file osgearth_manip.cpp.

        {
            using namespace std;
            usage.addKeyboardMouseBinding(string(1, _key),
                string("Toggle azimuth locking"));
        }
bool anonymous_namespace{osgearth_manip.cpp}::LockAzimuthHandler::handle ( const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  aa 
) [inline]

Definition at line 122 of file osgearth_manip.cpp.

        {
            if (ea.getEventType() == ea.KEYDOWN && ea.getKey() == _key)
            {
                bool lockAzimuth
                    = _manip->getSettings()->getLockAzimuthWhilePanning();
                _manip->getSettings()->setLockAzimuthWhilePanning(!lockAzimuth);
                return true;
            }
            return false;
        }

Member Data Documentation

char anonymous_namespace{osgearth_manip.cpp}::LockAzimuthHandler::_key

Definition at line 141 of file osgearth_manip.cpp.

osg::ref_ptr<EarthManipulator> anonymous_namespace{osgearth_manip.cpp}::LockAzimuthHandler::_manip

Definition at line 142 of file osgearth_manip.cpp.


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