Improvements to the handling of coordinate system nodes

This commit is contained in:
Robert Osfield
2004-07-09 15:21:33 +00:00
parent 9cb7bb0f4a
commit 504dd515d3
8 changed files with 43 additions and 15 deletions

View File

@@ -77,6 +77,10 @@ public:
// Overrides from MatrixManipulator...
/** set the minimum distance (as ratio) the eye point can be zoomed in towards the
center before the center is pushed forward.*/
virtual void setMinimumDistance(float minimumDistance);
/** set the coordinate frame which callback tells the manipulator which way is up, east and north.*/
virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb);

View File

@@ -50,6 +50,15 @@ public:
virtual ~CoordinateFrameCallback() {}
};
/** set the minimum distance (as ratio) the eye point can be zoomed in towards the
center before the center is pushed forward.*/
virtual void setMinimumDistance(float minimumDistance) { _minimumDistance=minimumDistance; }
/** get the minimum distance (as ratio) the eye point can be zoomed in */
float getMinimumDistance() const { return _minimumDistance; }
/** set the coordinate frame which callback tells the manipulator which way is up, east and north.*/
virtual void setCoordinateFrameCallback(CoordinateFrameCallback* cb) { _coordinateFrameCallback = cb; }
@@ -125,6 +134,8 @@ protected:
MatrixManipulator();
virtual ~MatrixManipulator();
double _minimumDistance;
osg::ref_ptr<CoordinateFrameCallback> _coordinateFrameCallback;
};

View File

@@ -38,14 +38,6 @@ class OSGGA_EXPORT TerrainManipulator : public MatrixManipulator
RotationMode getRotationMode() const { return _rotationMode; }
/** set the minimum distance (as ratio) the eye point can be zoomed in towards the
center before the center is pushed forward.*/
void setMinimumDistance(float minimumDistance) { _minimumDistance=minimumDistance; }
/** get the minimum distance (as ratio) the eye point can be zoomed in */
float getMinimumDistance() const { return _minimumDistance; }
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByMatrix(const osg::Matrixd& matrix);
@@ -123,7 +115,6 @@ class OSGGA_EXPORT TerrainManipulator : public MatrixManipulator
osg::ref_ptr<osg::Node> _node;
RotationMode _rotationMode;
double _minimumDistance;
bool _thrown;