KeySwitchMatrixManipulator is a decorator which allows the type of camera manipulator being used to be switched by pressing a key.
Inheritance:
Public Methods
-
virtual const char* className() const
-
void addMatrixManipulator(int key, std::string name, MatrixManipulator* cm)
- Add a camera manipulator with an associated name, and a key to trigger the switch,
-
void addNumberedMatrixManipulator(MatrixManipulator* cm)
- Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd
-
unsigned int getNumMatrixManipulators() const
-
void selectMatrixManipulator(unsigned int num)
-
KeyManipMap& getKeyManipMap()
- Get the complete list of manipulators attached to this keyswitch manipulator
-
const KeyManipMap& getKeyManipMap() const
- Get the const complete list of manipulators attached to this keyswitch manipulator
-
MatrixManipulator* getCurrentMatrixManipulator()
- Get the current active manipulators
-
const MatrixManipulator* getCurrentMatrixManipulator() const
- Get the const current active manipulators
-
MatrixManipulator* getMatrixManipulator(unsigned int key)
- Get manipulator assigned to a specified key
-
const MatrixManipulator* getMatrixManipulator(unsigned int key) const
- Get const manipulator assigned to a specified key
-
virtual void setMinimumDistance(float minimumDistance)
- set the minimum distance (as ratio) the eye point can be zoomed in towards the center before the center is pushed forward
-
virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb)
- set the coordinate frame which callback tells the manipulator which way is up, east and north
-
virtual void setByMatrix(const osg::Matrixd& matrix)
- Set the position of the matrix manipulator using a 4x4 Matrix
-
virtual void setByInverseMatrix(const osg::Matrixd& matrix)
- set the position of the matrix manipulator using a 4x4 Matrix
-
virtual osg::Matrixd getMatrix() const
- get the position of the manipulator as 4x4 Matrix
-
virtual osg::Matrixd getInverseMatrix() const
- get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix
-
virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const
- Get the FusionDistanceMode.
-
virtual float getFusionDistanceValue() const
- Get the FusionDistanceValue.
-
virtual void setNode(osg::Node* n)
-
virtual const osg::Node* getNode() const
-
virtual osg::Node* getNode()
-
virtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up)
-
virtual void setAutoComputeHomePosition(bool flag)
-
virtual void computeHomePosition()
-
virtual void home(const GUIEventAdapter& ee, GUIActionAdapter& aa)
-
virtual void init(const GUIEventAdapter& ee, GUIActionAdapter& aa)
-
virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
-
virtual void getUsage(osg::ApplicationUsage& usage) const
- Get the keyboard and mouse usage of this manipulator
Public
-
typedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator
-
typedef std::map<int, NamedManipulator> KeyManipMap
Public Classes
-
class CoordinateFrameCallback: public osg::Referenced
- callback class to use to allow matrix manipulators to querry the application for the local coordinate frame
Public Methods
-
float getMinimumDistance() const
-
CoordinateFrameCallback* getCoordinateFrameCallback()
-
const CoordinateFrameCallback* getCoordinateFrameCallback() const
-
osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d& position) const
-
osg::Vec3d getSideVector(const osg::CoordinateFrame& cf) const
-
osg::Vec3d getFrontVector(const osg::CoordinateFrame& cf) const
-
osg::Vec3d getUpVector(const osg::CoordinateFrame& cf) const
-
virtual void getHomePosition(osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up)
-
bool getAutoComputeHomePosition() const
-
virtual void accept(GUIEventHandlerVisitor& v)
Protected Fields
-
double _minimumDistance
-
bool _autoComputeHomePosition
-
osg::Vec3d _homeEye
-
osg::Vec3d _homeCenter
-
osg::Vec3d _homeUp
-
osg::ref_ptr<CoordinateFrameCallback> _coordinateFrameCallback
Public Methods
-
META_Object (osgGA, GUIEventHandler) const () const
-
virtual CompositeGUIEventHandler* getComposite()
Documentation
KeySwitchMatrixManipulator is a decorator which allows the type of camera manipulator
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.
- typedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator
- typedef std::map<int, NamedManipulator> KeyManipMap
- virtual const char* className() const
- void addMatrixManipulator(int key, std::string name, MatrixManipulator* cm)
-
Add a camera manipulator with an associated name, and a key to
trigger the switch,
- void addNumberedMatrixManipulator(MatrixManipulator* cm)
-
Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd
- unsigned int getNumMatrixManipulators() const
- void selectMatrixManipulator(unsigned int num)
- KeyManipMap& getKeyManipMap()
- Get the complete list of manipulators attached to this keyswitch manipulator
- const KeyManipMap& getKeyManipMap() const
- Get the const complete list of manipulators attached to this keyswitch manipulator
- MatrixManipulator* getCurrentMatrixManipulator()
- Get the current active manipulators
- const MatrixManipulator* getCurrentMatrixManipulator() const
- Get the const current active manipulators
- MatrixManipulator* getMatrixManipulator(unsigned int key)
- Get manipulator assigned to a specified key
- const MatrixManipulator* getMatrixManipulator(unsigned int key) const
- Get const manipulator assigned to a specified key
- virtual void setMinimumDistance(float minimumDistance)
- set the minimum distance (as ratio) the eye point can be zoomed in towards the
center before the center is pushed forward
- virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb)
- set the coordinate frame which callback tells the manipulator which way is up, east and north
- virtual void setByMatrix(const osg::Matrixd& matrix)
- Set the position of the matrix manipulator using a 4x4 Matrix
- virtual void setByInverseMatrix(const osg::Matrixd& matrix)
- set the position of the matrix manipulator using a 4x4 Matrix
- virtual osg::Matrixd getMatrix() const
- get the position of the manipulator as 4x4 Matrix
- virtual osg::Matrixd getInverseMatrix() const
- get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix
- virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const
- Get the FusionDistanceMode. Used by SceneView for setting up setereo convergence.
- virtual float getFusionDistanceValue() const
- Get the FusionDistanceValue. Used by SceneView for setting up setereo convergence.
- virtual void setNode(osg::Node* n)
- virtual const osg::Node* getNode() const
- virtual osg::Node* getNode()
- virtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up)
- virtual void setAutoComputeHomePosition(bool flag)
- virtual void computeHomePosition()
- virtual void home(const GUIEventAdapter& ee, GUIActionAdapter& aa)
- virtual void init(const GUIEventAdapter& ee, GUIActionAdapter& aa)
- virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
- virtual void getUsage(osg::ApplicationUsage& usage) const
- Get the keyboard and mouse usage of this manipulator
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.