14#ifndef OSGGA_DRIVEMANIPULATOR
15#define OSGGA_DRIVEMANIPULATOR 1
35 virtual const char*
className()
const {
return "Drive"; }
The 'GA' in osgGA stands for 'GUI Abstraction'; the osgGA namespace provides facilities to help devel...
Definition Callback:21
Definition ApplicationUsage:26
static Matrixd inverse(const Matrixd &matrix)
Definition Matrixd:536
Base class for all internal nodes in the scene graph.
Definition Node:72
Smart pointer for observed objects, that automatically set pointers to them to null when they are del...
Definition observer_ptr:39
A quaternion class.
Definition Quat:30
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
General purpose double triple for use as vertices, vectors and normals.
Definition Vec3d:30
virtual void setNode(osg::Node *)
Attach a node to the manipulator, automatically detaching any previously attached node.
virtual void home(const GUIEventAdapter &ea, GUIActionAdapter &us)
Move the camera to the default position.
SpeedControlMode
Definition DriveManipulator:105
@ USE_MOUSE_Y_FOR_SPEED
Definition DriveManipulator:106
@ USE_MOUSE_BUTTONS_FOR_SPEED
Definition DriveManipulator:107
double _pitch
Definition DriveManipulator:114
osg::observer_ptr< osg::Node > _node
Definition DriveManipulator:98
void flushMouseEventStack()
Reset the internal GUIEvent stack.
SpeedControlMode _speedMode
Definition DriveManipulator:110
virtual void setByMatrix(const osg::Matrixd &matrix)
Get the position of the matrix manipulator using a 4x4 Matrix.
void setModelScale(double in_ms)
Definition DriveManipulator:66
bool _pitchUpKeyPressed
Definition DriveManipulator:117
osg::Vec3d _eye
Definition DriveManipulator:112
double getVelocity() const
Definition DriveManipulator:70
osg::Quat _rotation
Definition DriveManipulator:113
virtual void computeHomePosition()
double _buffer
Definition DriveManipulator:103
double getModelScale() const
Definition DriveManipulator:67
double _velocity
Definition DriveManipulator:101
virtual osg::Node * getNode()
Return node if attached.
virtual void getUsage(osg::ApplicationUsage &usage) const
Get the keyboard and mouse usage of this manipulator.
virtual ~DriveManipulator()
void computePosition(const osg::Vec3d &eye, const osg::Vec3d &lv, const osg::Vec3d &up)
void addMouseEvent(const GUIEventAdapter &ea)
Add the current mouse GUIEvent to internal stack.
void setHeight(double in_h)
Definition DriveManipulator:72
bool calcMovement()
For the given mouse movement calculate the movement of the camera.
virtual const char * className() const
return the name of the object's class type.
Definition DriveManipulator:35
double _distance
Definition DriveManipulator:115
double _height
Definition DriveManipulator:102
double getHeight() const
Definition DriveManipulator:73
virtual void setByInverseMatrix(const osg::Matrixd &matrix)
Set the position of the matrix manipulator using a 4x4 Matrix.
Definition DriveManipulator:41
bool intersect(const osg::Vec3d &start, const osg::Vec3d &end, osg::Vec3d &intersection, osg::Vec3d &normal) const
virtual osg::Matrixd getMatrix() const
Get the position of the manipulator as 4x4 Matrix.
double _modelScale
Definition DriveManipulator:100
bool _pitchDownKeyPressed
Definition DriveManipulator:118
void setVelocity(double in_vel)
Definition DriveManipulator:69
virtual void init(const GUIEventAdapter &ea, GUIActionAdapter &us)
Start/restart the manipulator.
virtual const osg::Node * getNode() const
Return const node if attached.
osg::ref_ptr< const GUIEventAdapter > _ga_t1
Definition DriveManipulator:95
osg::ref_ptr< const GUIEventAdapter > _ga_t0
Definition DriveManipulator:96
virtual bool handle(const GUIEventAdapter &ea, GUIActionAdapter &us)
Handle events, return true if handled, false otherwise.
virtual osg::Matrixd getInverseMatrix() const
Get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model...
Definition GUIActionAdapter:62
Event class for storing Keyboard, mouse and window events.
Definition GUIEventAdapter:82
#define OSGGA_EXPORT
Definition Export:40