OSG
3.4.0
|
#include <KeySwitchMatrixManipulator.h>
Public Types | |
typedef std::pair< std::string, osg::ref_ptr < CameraManipulator > > | NamedManipulator |
typedef std::map< int, NamedManipulator > | KeyManipMap |
![]() | |
enum | DataVariance { DYNAMIC, STATIC, UNSPECIFIED } |
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 TrackballManipulator, '2' for a DriveManipulator, '3' for a FlightManipulator. The manipulators available, and the associated switch keys, can be configured.
Definition at line 31 of file KeySwitchMatrixManipulator.h.
typedef std::map<int, NamedManipulator> osgGA::KeySwitchMatrixManipulator::KeyManipMap |
Definition at line 36 of file KeySwitchMatrixManipulator.h.
typedef std::pair<std::string, osg::ref_ptr<CameraManipulator> > osgGA::KeySwitchMatrixManipulator::NamedManipulator |
Definition at line 35 of file KeySwitchMatrixManipulator.h.
void osgGA::KeySwitchMatrixManipulator::addMatrixManipulator | ( | int | key, |
std::string | name, | ||
CameraManipulator * | cm | ||
) |
Add a camera manipulator with an associated name, and a key to trigger the switch,
void osgGA::KeySwitchMatrixManipulator::addNumberedMatrixManipulator | ( | CameraManipulator * | cm | ) |
Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd.
|
inlinevirtual |
return the name of the object's class type. Must be defined by derived classes.
Reimplemented from osgGA::CameraManipulator.
Definition at line 38 of file KeySwitchMatrixManipulator.h.
|
virtual |
|
virtual |
finish any active manipulator animations.
Reimplemented from osgGA::CameraManipulator.
|
inline |
Get the current active manipulators.
Definition at line 63 of file KeySwitchMatrixManipulator.h.
|
inline |
Get the const current active manipulators.
Definition at line 66 of file KeySwitchMatrixManipulator.h.
|
inlinevirtual |
Get the FusionDistanceMode. Used by SceneView for setting up stereo convergence.
Reimplemented from osgGA::CameraManipulator.
Definition at line 100 of file KeySwitchMatrixManipulator.h.
|
inlinevirtual |
Get the FusionDistanceValue. Used by SceneView for setting up stereo convergence.
Reimplemented from osgGA::CameraManipulator.
Definition at line 103 of file KeySwitchMatrixManipulator.h.
|
inlinevirtual |
get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.
Implements osgGA::CameraManipulator.
Definition at line 97 of file KeySwitchMatrixManipulator.h.
|
inline |
Get the complete list of manipulators attached to this keyswitch manipulator.
Definition at line 56 of file KeySwitchMatrixManipulator.h.
|
inline |
Get the const complete list of manipulators attached to this keyswitch manipulator.
Definition at line 59 of file KeySwitchMatrixManipulator.h.
|
inlinevirtual |
get the position of the manipulator as 4x4 Matrix.
Implements osgGA::CameraManipulator.
Definition at line 94 of file KeySwitchMatrixManipulator.h.
CameraManipulator* osgGA::KeySwitchMatrixManipulator::getMatrixManipulatorWithIndex | ( | unsigned int | key | ) |
Get manipulator assigned to a specified index.
const CameraManipulator* osgGA::KeySwitchMatrixManipulator::getMatrixManipulatorWithIndex | ( | unsigned int | key | ) | const |
Get const manipulator assigned to a specified index.
CameraManipulator* osgGA::KeySwitchMatrixManipulator::getMatrixManipulatorWithKey | ( | unsigned int | key | ) |
Get manipulator assigned to a specified key.
const CameraManipulator* osgGA::KeySwitchMatrixManipulator::getMatrixManipulatorWithKey | ( | unsigned int | key | ) | const |
Get const manipulator assigned to a specified key.
|
inlinevirtual |
Return const node if attached.
Reimplemented from osgGA::CameraManipulator.
Definition at line 108 of file KeySwitchMatrixManipulator.h.
|
inlinevirtual |
Return node if attached.
Reimplemented from osgGA::CameraManipulator.
Definition at line 110 of file KeySwitchMatrixManipulator.h.
|
inline |
Definition at line 51 of file KeySwitchMatrixManipulator.h.
|
virtual |
Get the keyboard and mouse usage of this manipulator.
Reimplemented from osgGA::EventHandler.
|
virtual |
Handle events, return true if handled, false otherwise.
Reimplemented from osgGA::CameraManipulator.
|
virtual |
Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.
Reimplemented from osgGA::CameraManipulator.
|
inlinevirtual |
Start/restart the manipulator. FIXME: what does this actually mean? Provide examples.
Reimplemented from osgGA::CameraManipulator.
Definition at line 122 of file KeySwitchMatrixManipulator.h.
void osgGA::KeySwitchMatrixManipulator::selectMatrixManipulator | ( | unsigned int | num | ) |
|
virtual |
Set whether the automatic compute of the home position is enabled.
Reimplemented from osgGA::CameraManipulator.
|
inlinevirtual |
set the position of the matrix manipulator using a 4x4 Matrix.
Implements osgGA::CameraManipulator.
Definition at line 91 of file KeySwitchMatrixManipulator.h.
|
inlinevirtual |
Set the position of the matrix manipulator using a 4x4 Matrix.
Implements osgGA::CameraManipulator.
Definition at line 88 of file KeySwitchMatrixManipulator.h.
|
virtual |
set the coordinate frame which callback tells the manipulator which way is up, east and north.
Reimplemented from osgGA::CameraManipulator.
|
virtual |
Manually set the home position, and set the automatic compute of home position.
Reimplemented from osgGA::CameraManipulator.
|
virtual |
Attach a node to the manipulator, automatically detaching any previously attached node. setNode(NULL) detaches previous nodes. May be ignored by manipulators which do not require a reference model.
Reimplemented from osgGA::CameraManipulator.