diff --git a/include/osgGA/UFOManipulator b/include/osgGA/UFOManipulator index c31fb6a79..2cb812970 100644 --- a/include/osgGA/UFOManipulator +++ b/include/osgGA/UFOManipulator @@ -16,8 +16,6 @@ #include -#include - #include #include #include @@ -58,9 +56,9 @@ namespace osgGA { class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator { - public: + public: /** Default constructor */ - UFOManipulator(); + UFOManipulator(); /** return className \return returns constant "UFO" @@ -70,18 +68,18 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator /** Set the current position with a matrix \param matrix A viewpoint matrix. */ - virtual void setByMatrix( const osg::Matrixd &matrix ) ; + virtual void setByMatrix( const osg::Matrixd &matrix ) ; /** Set the current position with the invers matrix \param invmatrix The inverse of a viewpoint matrix */ - virtual void setByInverseMatrix( const osg::Matrixd &invmat); + virtual void setByInverseMatrix( const osg::Matrixd &invmat); /** Get the current viewmatrix */ - virtual osg::Matrixd getMatrix() const; + virtual osg::Matrixd getMatrix() const; /** Get the current inverse view matrix */ - virtual osg::Matrixd getInverseMatrix() const ; + virtual osg::Matrixd getInverseMatrix() const ; /** Set the subgraph this manipulator is driving the eye through. \param node root of subgraph @@ -105,7 +103,7 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator virtual void init(const GUIEventAdapter& ,GUIActionAdapter&); /** Handles incoming osgGA events */ - bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter &aa); + bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter &aa); /** Reports Usage parameters to the application */ void getUsage(osg::ApplicationUsage& usage) const; @@ -115,11 +113,11 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator protected: - private: + private: osg::ref_ptr _node; - float _viewAngle; - osg::Matrixd _matrix; - osg::Matrixd _inverseMatrix; + float _viewAngle; + osg::Matrixd _matrix; + osg::Matrixd _inverseMatrix; osg::Matrixd _offset; double _minHeightAboveGround; diff --git a/src/osgGA/UFOManipulator.cpp b/src/osgGA/UFOManipulator.cpp index 0d4dda70c..57e77c700 100644 --- a/src/osgGA/UFOManipulator.cpp +++ b/src/osgGA/UFOManipulator.cpp @@ -250,15 +250,15 @@ void UFOManipulator::_keyUp( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionA { switch( ea.getKey() ) { - case Producer::KeyChar_Control_L: - case Producer::KeyChar_Control_R: + case osgGA::GUIEventAdapter::KEY_Control_L: + case osgGA::GUIEventAdapter::KEY_Control_R: _ctrl = false; _decelerateOffsetRate = true; _straightenOffset = false; break; - case Producer::KeyChar_Shift_L: - case Producer::KeyChar_Shift_R: + case osgGA::GUIEventAdapter::KEY_Shift_L: + case osgGA::GUIEventAdapter::KEY_Shift_R: _shift = false; _decelerateUpSideRate = true; break; @@ -269,17 +269,17 @@ void UFOManipulator::_keyDown( const osgGA::GUIEventAdapter &ea, osgGA::GUIActio { switch( ea.getKey() ) { - case Producer::KeyChar_Control_L: - case Producer::KeyChar_Control_R: + case osgGA::GUIEventAdapter::KEY_Control_L: + case osgGA::GUIEventAdapter::KEY_Control_R: _ctrl = true; break; - case Producer::KeyChar_Shift_L : - case Producer::KeyChar_Shift_R : + case osgGA::GUIEventAdapter::KEY_Shift_L : + case osgGA::GUIEventAdapter::KEY_Shift_R : _shift = true; break; - case Producer::KeyChar_Up: + case osgGA::GUIEventAdapter::KEY_Up: if( _ctrl ) { _pitchOffsetRate -= _viewOffsetDelta; @@ -297,7 +297,7 @@ void UFOManipulator::_keyDown( const osgGA::GUIEventAdapter &ea, osgGA::GUIActio } break; - case Producer::KeyChar_Down: + case osgGA::GUIEventAdapter::KEY_Down: if( _ctrl ) { _pitchOffsetRate += _viewOffsetDelta; @@ -315,7 +315,7 @@ void UFOManipulator::_keyDown( const osgGA::GUIEventAdapter &ea, osgGA::GUIActio } break; - case Producer::KeyChar_Right: + case osgGA::GUIEventAdapter::KEY_Right: if( _ctrl ) { _yawOffsetRate += _viewOffsetDelta; @@ -333,7 +333,7 @@ void UFOManipulator::_keyDown( const osgGA::GUIEventAdapter &ea, osgGA::GUIActio } break; - case Producer::KeyChar_Left: + case osgGA::GUIEventAdapter::KEY_Left: if( _ctrl ) { _yawOffsetRate -= _viewOffsetDelta; @@ -351,7 +351,7 @@ void UFOManipulator::_keyDown( const osgGA::GUIEventAdapter &ea, osgGA::GUIActio } break; - case Producer::KeyChar_Return: + case osgGA::GUIEventAdapter::KEY_Return: if( _ctrl ) { _straightenOffset = true;