Added s/getCenter and s/getRotation methods, and updated wrapper.

This commit is contained in:
Robert Osfield 2005-11-18 15:00:34 +00:00
parent 38a9dc51f8
commit b0869a6f60
2 changed files with 26 additions and 4 deletions

View File

@ -78,11 +78,17 @@ class OSGGA_EXPORT TrackballManipulator : public MatrixManipulator
/** 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);
/** Set the center of the trackball. */
void setCenter(const osg::Vec3d& center) { _center = center; }
/** Get the size of the trackball. */
float getTrackballSize() const { return _trackballSize; }
/** Get the center of the trackball. */
const osg::Vec3d& getCenter() const { return _center; }
/** Set the rotation of the trackball. */
void setRotation(const osg::Quat& rotation) { _rotation = rotation; }
/** Get the rotation of the trackball. */
const osg::Quat& getRotation() const { return _rotation; }
/** Set the distance of the trackball. */
void setDistance(double distance) { _distance = distance; }
@ -90,6 +96,11 @@ class OSGGA_EXPORT TrackballManipulator : public MatrixManipulator
/** Get the distance of the trackball. */
double getDistance() const { return _distance; }
/** Set the size of the trackball. */
void setTrackballSize(float size);
/** Get the size of the trackball. */
float getTrackballSize() const { return _trackballSize; }
protected:
virtual ~TrackballManipulator();

View File

@ -12,6 +12,8 @@
#include <osg/ApplicationUsage>
#include <osg/Matrixd>
#include <osg/Node>
#include <osg/Quat>
#include <osg/Vec3d>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/TrackballManipulator>
@ -45,16 +47,25 @@ BEGIN_OBJECT_REFLECTOR(osgGA::TrackballManipulator)
I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage);
I_Method1(void, setMinimumZoomScale, IN, double, minimumZoomScale);
I_Method0(double, getMinimumZoomScale);
I_Method1(void, setCenter, IN, const osg::Vec3d &, center);
I_Method0(const osg::Vec3d &, getCenter);
I_Method1(void, setRotation, IN, const osg::Quat &, rotation);
I_Method0(const osg::Quat &, getRotation);
I_Method1(void, setDistance, IN, double, distance);
I_Method0(double, getDistance);
I_Method1(void, setTrackballSize, IN, float, size);
I_Method0(float, getTrackballSize);
I_WriteOnlyProperty(const osg::Matrixd &, ByInverseMatrix);
I_WriteOnlyProperty(const osg::Matrixd &, ByMatrix);
I_Property(const osg::Vec3d &, Center);
I_Property(double, Distance);
I_ReadOnlyProperty(osgUtil::SceneView::FusionDistanceMode, FusionDistanceMode);
I_ReadOnlyProperty(float, FusionDistanceValue);
I_ReadOnlyProperty(osg::Matrixd, InverseMatrix);
I_ReadOnlyProperty(osg::Matrixd, Matrix);
I_Property(double, MinimumZoomScale);
I_Property(osg::Node *, Node);
I_Property(const osg::Quat &, Rotation);
I_Property(float, TrackballSize);
END_REFLECTOR