diff --git a/include/osgGA/KeySwitchMatrixManipulator b/include/osgGA/KeySwitchMatrixManipulator index 53db2e7de..21e5cba39 100644 --- a/include/osgGA/KeySwitchMatrixManipulator +++ b/include/osgGA/KeySwitchMatrixManipulator @@ -34,6 +34,9 @@ class OSGGA_EXPORT KeySwitchMatrixManipulator : public MatrixManipulator { public: + typedef std::pair > NamedManipulator; + typedef std::map KeyManipMap; + virtual const char* className() const { return "KeySwitchMatrixManipulator"; } /** @@ -51,23 +54,33 @@ public: void selectMatrixManipulator(unsigned int num); + /** Get the complete list of manipulators attached to this keyswitch manipulator.*/ + KeyManipMap& getKeyManipMap() { return _manips; } + /** Get the const complete list of manipulators attached to this keyswitch manipulator.*/ + const KeyManipMap& getKeyManipMap() const { return _manips; } + + + /** Get the current active manipulators.*/ MatrixManipulator* getCurrentMatrixManipulator() { return _current.get(); } + /** Get the const current active manipulators.*/ const MatrixManipulator* getCurrentMatrixManipulator() const { return _current.get(); } - MatrixManipulator* getMatrixManipulator(unsigned int num); + /** Get manipulator assigned to a specified key.*/ + MatrixManipulator* getMatrixManipulator(unsigned int key); - const MatrixManipulator* getMatrixManipulator(unsigned int num) const; + /** Get const manipulator assigned to a specified key.*/ + const MatrixManipulator* getMatrixManipulator(unsigned int key) const; // Overrides from MatrixManipulator... - /** set the coordinate frame which tells the manipulator which way is up, east and north.*/ + /** Set the coordinate frame which tells the manipulator which way is up, east and north.*/ virtual void setCoordinateFrame(const osg::CoordinateFrame& cf) { _coordinateFrame = cf; _current->setCoordinateFrame(cf); } - /** set the position of the matrix manipulator using a 4x4 Matrix.*/ + /** Set the position of the matrix manipulator using a 4x4 Matrix.*/ virtual void setByMatrix(const osg::Matrixd& matrix) { _current->setByMatrix(matrix); } /** set the position of the matrix manipulator using a 4x4 Matrix.*/ @@ -103,8 +116,6 @@ public: private: - typedef std::pair > NamedManipulator; - typedef std::map KeyManipMap; KeyManipMap _manips; osg::ref_ptr _current;