Removed remaining dependancies on osg::Camera.

This commit is contained in:
Robert Osfield
2003-05-19 15:15:17 +00:00
parent 4151312dc5
commit 940ce67133
31 changed files with 506 additions and 616 deletions

View File

@@ -14,18 +14,19 @@
#ifndef OSGGA_FLIGHTMANIPULATOR
#define OSGGA_FLIGHTMANIPULATOR 1
#include <osgGA/CameraManipulator>
#include <osgGA/MatrixManipulator>
#include <osg/Quat>
namespace osgGA{
/**
FlightManipulator is a CameraManipulator which provides flight simulator-like
FlightManipulator is a MatrixManipulator which provides flight simulator-like
updating of the camera position & orientation. By default, the left mouse
button accelerates, the right mouse button decelerates, and the middle mouse
button (or left and right simultaneously) stops dead.
*/
class OSGGA_EXPORT FlightManipulator : public CameraManipulator
class OSGGA_EXPORT FlightManipulator : public MatrixManipulator
{
public:
@@ -33,6 +34,19 @@ class OSGGA_EXPORT FlightManipulator : public CameraManipulator
virtual const char* className() const { return "Flight"; }
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByMatrix(const osg::Matrix& matrix);
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByInverseMatrix(const osg::Matrix& matrix) { setByMatrix(osg::Matrix::inverse(matrix)); }
/** get the position of the manipulator as 4x4 Matrix.*/
virtual osg::Matrix getMatrix() const;
/** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/
virtual osg::Matrix getInverseMatrix() const;
virtual void setNode(osg::Node*);
virtual const osg::Node* getNode() const;
@@ -65,9 +79,7 @@ class OSGGA_EXPORT FlightManipulator : public CameraManipulator
/** Add the current mouse GUIEvent to internal stack.*/
void addMouseEvent(const GUIEventAdapter& ea);
void computeLocalDataFromCamera();
void computeCameraFromLocalData();
void computePosition(const osg::Vec3& eye,const osg::Vec3& lv,const osg::Vec3& up);
/** For the give mouse movement calculate the movement of the camera.
Return true is camera has moved and a redraw is required.*/