class OSGGA_EXPORT osgGA::KeySwitchMatrixManipulator

KeySwitchMatrixManipulator is a decorator which allows the type of camera manipulator being used to be switched by pressing a key.

Inheritance:


Public Methods

[more]virtual const char* className() const
[more]void addMatrixManipulator(int key, std::string name, MatrixManipulator* cm)
Add a camera manipulator with an associated name, and a key to trigger the switch,
[more]void addNumberedMatrixManipulator(MatrixManipulator* cm)
Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd
[more]unsigned int getNumMatrixManipulators() const
[more]void selectMatrixManipulator(unsigned int num)
[more]KeyManipMap& getKeyManipMap()
Get the complete list of manipulators attached to this keyswitch manipulator
[more]const KeyManipMap& getKeyManipMap() const
Get the const complete list of manipulators attached to this keyswitch manipulator
[more]MatrixManipulator* getCurrentMatrixManipulator()
Get the current active manipulators
[more]const MatrixManipulator* getCurrentMatrixManipulator() const
Get the const current active manipulators
[more]MatrixManipulator* getMatrixManipulator(unsigned int key)
Get manipulator assigned to a specified key
[more]const MatrixManipulator* getMatrixManipulator(unsigned int key) const
Get const manipulator assigned to a specified key
[more]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
[more]virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb)
set the coordinate frame which callback tells the manipulator which way is up, east and north
[more]virtual void setByMatrix(const osg::Matrixd& matrix)
Set the position of the matrix manipulator using a 4x4 Matrix
[more]virtual void setByInverseMatrix(const osg::Matrixd& matrix)
set the position of the matrix manipulator using a 4x4 Matrix
[more]virtual osg::Matrixd getMatrix() const
get the position of the manipulator as 4x4 Matrix
[more]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
[more]virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const
Get the FusionDistanceMode.
[more]virtual float getFusionDistanceValue() const
Get the FusionDistanceValue.
[more]virtual void setNode(osg::Node* n)
[more]virtual const osg::Node* getNode() const
[more]virtual osg::Node* getNode()
[more]virtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up)
[more]virtual void setAutoComputeHomePosition(bool flag)
[more]virtual void computeHomePosition()
[more]virtual void home(const GUIEventAdapter& ee, GUIActionAdapter& aa)
[more]virtual void init(const GUIEventAdapter& ee, GUIActionAdapter& aa)
[more]virtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)
[more]virtual void getUsage(osg::ApplicationUsage& usage) const
Get the keyboard and mouse usage of this manipulator

Public

[more]typedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator
[more]typedef std::map<int, NamedManipulator> KeyManipMap


Inherited from MatrixManipulator:

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

ofloat getMinimumDistance() const
oCoordinateFrameCallback* getCoordinateFrameCallback()
oconst CoordinateFrameCallback* getCoordinateFrameCallback() const
oosg::CoordinateFrame getCoordinateFrame(const osg::Vec3d& position) const
oosg::Vec3d getSideVector(const osg::CoordinateFrame& cf) const
oosg::Vec3d getFrontVector(const osg::CoordinateFrame& cf) const
oosg::Vec3d getUpVector(const osg::CoordinateFrame& cf) const
ovirtual void getHomePosition(osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up)
obool getAutoComputeHomePosition() const
ovirtual void accept(GUIEventHandlerVisitor& v)

Protected Fields

odouble _minimumDistance
obool _autoComputeHomePosition
oosg::Vec3d _homeEye
oosg::Vec3d _homeCenter
oosg::Vec3d _homeUp
oosg::ref_ptr<CoordinateFrameCallback> _coordinateFrameCallback


Inherited from GUIEventHandler:

Public Methods

oMETA_Object (osgGA, GUIEventHandler) const () const
ovirtual 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.
otypedef std::pair<std::string, osg::ref_ptr<MatrixManipulator> > NamedManipulator

otypedef std::map<int, NamedManipulator> KeyManipMap

ovirtual const char* className() const

ovoid addMatrixManipulator(int key, std::string name, MatrixManipulator* cm)
Add a camera manipulator with an associated name, and a key to trigger the switch,

ovoid addNumberedMatrixManipulator(MatrixManipulator* cm)
Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd

ounsigned int getNumMatrixManipulators() const

ovoid selectMatrixManipulator(unsigned int num)

oKeyManipMap& getKeyManipMap()
Get the complete list of manipulators attached to this keyswitch manipulator

oconst KeyManipMap& getKeyManipMap() const
Get the const complete list of manipulators attached to this keyswitch manipulator

oMatrixManipulator* getCurrentMatrixManipulator()
Get the current active manipulators

oconst MatrixManipulator* getCurrentMatrixManipulator() const
Get the const current active manipulators

oMatrixManipulator* getMatrixManipulator(unsigned int key)
Get manipulator assigned to a specified key

oconst MatrixManipulator* getMatrixManipulator(unsigned int key) const
Get const manipulator assigned to a specified key

ovirtual 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

ovirtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb)
set the coordinate frame which callback tells the manipulator which way is up, east and north

ovirtual void setByMatrix(const osg::Matrixd& matrix)
Set the position of the matrix manipulator using a 4x4 Matrix

ovirtual void setByInverseMatrix(const osg::Matrixd& matrix)
set the position of the matrix manipulator using a 4x4 Matrix

ovirtual osg::Matrixd getMatrix() const
get the position of the manipulator as 4x4 Matrix

ovirtual osg::Matrixd getInverseMatrix() const
get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix

ovirtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const
Get the FusionDistanceMode. Used by SceneView for setting up setereo convergence.

ovirtual float getFusionDistanceValue() const
Get the FusionDistanceValue. Used by SceneView for setting up setereo convergence.

ovirtual void setNode(osg::Node* n)

ovirtual const osg::Node* getNode() const

ovirtual osg::Node* getNode()

ovirtual void setHomePosition(const osg::Vec3d& eye, const osg::Vec3d& center, const osg::Vec3d& up)

ovirtual void setAutoComputeHomePosition(bool flag)

ovirtual void computeHomePosition()

ovirtual void home(const GUIEventAdapter& ee, GUIActionAdapter& aa)

ovirtual void init(const GUIEventAdapter& ee, GUIActionAdapter& aa)

ovirtual bool handle(const GUIEventAdapter& ea, GUIActionAdapter& us)

ovirtual 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++.