Renamed osgGA::MatrixManipualtor to osgGA::CameraManipulator so its name better reflects it's function
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#define OSGUTIL_KEYSWITCMATRIXMANIPULATOR 1
|
||||
|
||||
#include <osgGA/Export>
|
||||
#include <osgGA/MatrixManipulator>
|
||||
#include <osgGA/CameraManipulator>
|
||||
#include <osgGA/GUIEventHandler>
|
||||
|
||||
namespace osgGA{
|
||||
@@ -28,11 +28,11 @@ being used to be switched by pressing a key. E.g. '1' for a TrackballManipultor,
|
||||
'2' for a DriveManipulator, '3' for a FlightManipulator. The manipulators available,
|
||||
and the associated switch keys, can be configured.
|
||||
*/
|
||||
class OSGGA_EXPORT KeySwitchMatrixManipulator : public MatrixManipulator
|
||||
class OSGGA_EXPORT KeySwitchMatrixManipulator : public CameraManipulator
|
||||
{
|
||||
public:
|
||||
|
||||
typedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator;
|
||||
typedef std::pair<std::string, osg::ref_ptr<CameraManipulator> > NamedManipulator;
|
||||
typedef std::map<int, NamedManipulator> KeyManipMap;
|
||||
|
||||
virtual const char* className() const { return "KeySwitchMatrixManipulator"; }
|
||||
@@ -41,12 +41,12 @@ class OSGGA_EXPORT KeySwitchMatrixManipulator : public MatrixManipulator
|
||||
Add a camera manipulator with an associated name, and a key to
|
||||
trigger the switch,
|
||||
*/
|
||||
void addMatrixManipulator(int key, std::string name, MatrixManipulator *cm);
|
||||
void addMatrixManipulator(int key, std::string name, CameraManipulator *cm);
|
||||
|
||||
/**
|
||||
Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd.
|
||||
*/
|
||||
void addNumberedMatrixManipulator(MatrixManipulator *cm);
|
||||
void addNumberedMatrixManipulator(CameraManipulator *cm);
|
||||
|
||||
unsigned int getNumMatrixManipulators() const { return _manips.size(); }
|
||||
|
||||
@@ -60,26 +60,26 @@ class OSGGA_EXPORT KeySwitchMatrixManipulator : public MatrixManipulator
|
||||
|
||||
|
||||
/** Get the current active manipulators.*/
|
||||
MatrixManipulator* getCurrentMatrixManipulator() { return _current.get(); }
|
||||
CameraManipulator* getCurrentMatrixManipulator() { return _current.get(); }
|
||||
|
||||
/** Get the const current active manipulators.*/
|
||||
const MatrixManipulator* getCurrentMatrixManipulator() const { return _current.get(); }
|
||||
const CameraManipulator* getCurrentMatrixManipulator() const { return _current.get(); }
|
||||
|
||||
|
||||
/** Get manipulator assigned to a specified index.*/
|
||||
MatrixManipulator* getMatrixManipulatorWithIndex(unsigned int key);
|
||||
CameraManipulator* getMatrixManipulatorWithIndex(unsigned int key);
|
||||
|
||||
/** Get const manipulator assigned to a specified index.*/
|
||||
const MatrixManipulator* getMatrixManipulatorWithIndex(unsigned int key) const;
|
||||
const CameraManipulator* getMatrixManipulatorWithIndex(unsigned int key) const;
|
||||
|
||||
/** Get manipulator assigned to a specified key.*/
|
||||
MatrixManipulator* getMatrixManipulatorWithKey(unsigned int key);
|
||||
CameraManipulator* getMatrixManipulatorWithKey(unsigned int key);
|
||||
|
||||
/** Get const manipulator assigned to a specified key.*/
|
||||
const MatrixManipulator* getMatrixManipulatorWithKey(unsigned int key) const;
|
||||
const CameraManipulator* getMatrixManipulatorWithKey(unsigned int key) const;
|
||||
|
||||
|
||||
// Overrides from MatrixManipulator...
|
||||
// Overrides from CameraManipulator...
|
||||
|
||||
/** set the coordinate frame which callback tells the manipulator which way is up, east and north.*/
|
||||
virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb);
|
||||
@@ -128,7 +128,7 @@ class OSGGA_EXPORT KeySwitchMatrixManipulator : public MatrixManipulator
|
||||
|
||||
KeyManipMap _manips;
|
||||
|
||||
osg::ref_ptr<MatrixManipulator> _current;
|
||||
osg::ref_ptr<CameraManipulator> _current;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user