From Mikkel Gjøl, addition of paramter set/get methods to osgGA::*Manipulators,
change of ' ' to GUIEventAdapter::KEY_Space, fix to url in Matrix_implementation.cpp. Syntax fixes by Robert Osfield to above submission fix inconsistencies with normal OSG coding style.
This commit is contained in:
@@ -63,6 +63,15 @@ class OSGGA_EXPORT DriveManipulator : public MatrixManipulator
|
||||
/** Get the keyboard and mouse usage of this manipulator.*/
|
||||
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
||||
|
||||
void setModelScale( double in_ms ) { _modelScale = in_ms; }
|
||||
double getModelScale() const { return _modelScale; }
|
||||
|
||||
void setVelocity( double in_vel ) { _velocity = in_vel; }
|
||||
double getVelocity() const { return _velocity; }
|
||||
|
||||
void setHeight( double in_h ) { _height = in_h; }
|
||||
double getHeight() const { return _height; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~DriveManipulator();
|
||||
|
||||
@@ -67,9 +67,18 @@ class OSGGA_EXPORT FlightManipulator : public MatrixManipulator
|
||||
NO_AUTOMATIC_YAW
|
||||
};
|
||||
|
||||
/** Configure the Yaw control for the flight model. */
|
||||
/** Configure the Yaw control for the flight model. */
|
||||
void setYawControlMode(YawControlMode ycm) { _yawMode = ycm; }
|
||||
|
||||
void setModelScale(double in_ms) { _modelScale = in_ms; }
|
||||
double getModelScale() const { return _modelScale; }
|
||||
|
||||
void setAcceleration(double in_acc) { _acceleration = in_acc; }
|
||||
double getAcceleration() const { return _acceleration; }
|
||||
|
||||
void setVelocity(double in_vel) { _velocity = in_vel; }
|
||||
double getVelocity() const { return _velocity; }
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~FlightManipulator();
|
||||
|
||||
@@ -22,18 +22,10 @@ namespace osgGA{
|
||||
class OSGGA_EXPORT TrackballManipulator : public MatrixManipulator
|
||||
{
|
||||
public:
|
||||
|
||||
TrackballManipulator();
|
||||
|
||||
virtual const char* className() const { return "Trackball"; }
|
||||
|
||||
/** set the minimum distance (as ratio) the eye point can be zoomed in towards the
|
||||
center before the center is pushed forward.*/
|
||||
void setMinimumZoomScale(float minimumZoomScale) { _minimumZoomScale=minimumZoomScale; }
|
||||
|
||||
/** get the minimum distance (as ratio) the eye point can be zoomed in */
|
||||
float getMinimumZoomScale() const { return _minimumZoomScale; }
|
||||
|
||||
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
|
||||
virtual void setByMatrix(const osg::Matrixd& matrix);
|
||||
|
||||
@@ -78,6 +70,14 @@ class OSGGA_EXPORT TrackballManipulator : public MatrixManipulator
|
||||
/** Get the keyboard and mouse usage of this manipulator.*/
|
||||
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
||||
|
||||
|
||||
/** set the minimum distance (as ratio) the eye point can be zoomed in towards the
|
||||
center before the center is pushed forward.*/
|
||||
void setMinimumZoomScale(double minimumZoomScale) { _minimumZoomScale=minimumZoomScale; }
|
||||
|
||||
/** get the minimum distance (as ratio) the eye point can be zoomed in */
|
||||
double getMinimumZoomScale() const { return _minimumZoomScale; }
|
||||
|
||||
/** Set the size of the trackball. */
|
||||
void setTrackballSize(float size);
|
||||
|
||||
|
||||
@@ -111,9 +111,24 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator
|
||||
/** Report the current position as LookAt vectors */
|
||||
void getCurrentPositionAsLookAt( osg::Vec3 &eye, osg::Vec3 ¢er, osg::Vec3 &up );
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
void setMinHeight( double in_min_height ) { _minHeightAboveGround = in_min_height; }
|
||||
double getMinHeight() const { return _minHeightAboveGround; }
|
||||
|
||||
void setMinDistance( double in_min_dist ) { _minDistanceInFront = in_min_dist; }
|
||||
double getMinDistance() const { return _minDistanceInFront; }
|
||||
|
||||
void setForwardSpeed( double in_fs ) { _forwardSpeed = in_fs; }
|
||||
double getForwardSpeed() const { return _forwardSpeed; }
|
||||
|
||||
void setSideSpeed( double in_ss ) { _sideSpeed = in_ss; }
|
||||
double getSideSpeed() const { return _sideSpeed; }
|
||||
|
||||
void setRotationSpeed( double in_rot_speed ) { _directionRotationRate = in_rot_speed; }
|
||||
double getRotationSpeed() const { return _directionRotationRate; }
|
||||
|
||||
|
||||
protected:
|
||||
osg::ref_ptr<osg::Node> _node;
|
||||
float _viewAngle;
|
||||
osg::Matrixd _matrix;
|
||||
|
||||
Reference in New Issue
Block a user