Added getKeyManipMap() method
This commit is contained in:
parent
97bf993e5d
commit
7596b3b361
@ -34,6 +34,9 @@ class OSGGA_EXPORT KeySwitchMatrixManipulator : public MatrixManipulator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator;
|
||||||
|
typedef std::map<int, NamedManipulator> KeyManipMap;
|
||||||
|
|
||||||
virtual const char* className() const { return "KeySwitchMatrixManipulator"; }
|
virtual const char* className() const { return "KeySwitchMatrixManipulator"; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,23 +54,33 @@ public:
|
|||||||
|
|
||||||
void selectMatrixManipulator(unsigned int num);
|
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(); }
|
MatrixManipulator* getCurrentMatrixManipulator() { return _current.get(); }
|
||||||
|
|
||||||
|
/** Get the const current active manipulators.*/
|
||||||
const MatrixManipulator* getCurrentMatrixManipulator() const { return _current.get(); }
|
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...
|
// 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); }
|
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); }
|
virtual void setByMatrix(const osg::Matrixd& matrix) { _current->setByMatrix(matrix); }
|
||||||
|
|
||||||
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
|
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
|
||||||
@ -103,8 +116,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
typedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator;
|
|
||||||
typedef std::map<int, NamedManipulator> KeyManipMap;
|
|
||||||
KeyManipMap _manips;
|
KeyManipMap _manips;
|
||||||
|
|
||||||
osg::ref_ptr<MatrixManipulator> _current;
|
osg::ref_ptr<MatrixManipulator> _current;
|
||||||
|
Loading…
Reference in New Issue
Block a user