19#ifndef OSGGA_VIEW_MANIPULATOR
20#define OSGGA_VIEW_MANIPULATOR 1
22#include <osgGA/StandardManipulator>
23#include <osgViewer/View>
33 typedef StandardManipulator inherited;
39 const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY);
43 virtual void setByMatrix(
const osg::Matrixd& matrix);
49 virtual void setTransformation(
const osg::Vec3d& eye,
const osg::Vec3d& center,
const osg::Vec3d& up);
51 virtual void getTransformation(osg::Vec3d& eye, osg::Vec3d& center, osg::Vec3d& up)
const;
58 virtual void setCenter(
const osg::Vec3d& center);
60 virtual void setRotation(
const osg::Quat& rotation);
70 virtual void setMinimumDistance(
const double& minimumDistance,
bool relativeToModelSize =
false);
80 virtual bool handleMouseWheel(
const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
86 virtual void applyAnimationStep(
const double currentProgress,
const double prevProgress);
89 const float px1,
const float py1,
const float scale);
92 virtual void panModel(
const float dx,
const float dy,
const float dz = 0.f);
93 virtual void zoomModel(
const float dy,
bool pushForwardIfNeeded =
true);
94 void trackball(osg::Vec3d&
axis,
float& angle,
float p1x,
float p1y,
float p2x,
float p2y);
113 void start(
const osg::Vec3d& movement,
const double startTime);
axis
Definition SourceTarget.h:5
Definition ViewManipulator.h:110
osg::Vec3d _movement
Definition ViewManipulator.h:112
void start(const osg::Vec3d &movement, const double startTime)
Definition ViewManipulator.cpp:380
Definition ViewManipulator.h:32
virtual float getFusionDistanceValue() const
Definition ViewManipulator.cpp:556
double _minimumDistance
Definition ViewManipulator.h:105
ViewManipulator(const ViewManipulator &om, const osg::CopyOp ©Op=osg::CopyOp::SHALLOW_COPY)
virtual void allocAnimationData()
Definition ViewManipulator.h:115
virtual void setDistance(double distance)
Definition ViewManipulator.cpp:591
virtual void rotateWithFixedVertical(const float dx, const float dy)
Definition ViewManipulator.cpp:409
const osg::Vec3d & getCenter() const
Definition ViewManipulator.cpp:570
void setHandleMouseMovement(bool flag)
Definition ViewManipulator.h:76
virtual void rotateWithFixedVertical(const float dx, const float dy, const osg::Vec3f &up)
virtual void rotateTrackball(const float px0, const float py0, const float px1, const float py1, const float scale)
Definition ViewManipulator.cpp:393
virtual bool handleMouseWheel(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
Definition ViewManipulator.cpp:227
virtual bool performMovementLeftMouseButton(const double eventTimeDelta, const double dx, const double dy)
Definition ViewManipulator.cpp:287
virtual osg::Matrixd getMatrix() const
Definition ViewManipulator.cpp:86
double _distance
Definition ViewManipulator.h:100
virtual void zoomModel(const float dy, bool pushForwardIfNeeded=true)
Definition ViewManipulator.cpp:444
static int _minimumDistanceFlagIndex
Definition ViewManipulator.h:106
virtual void setTransformation(const osg::Vec3d &eye, const osg::Quat &rotation)
Definition ViewManipulator.cpp:105
virtual bool startAnimationByMousePointerIntersection(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
Definition ViewManipulator.cpp:358
double getElevation() const
Returns the elevation in radians.
Definition ViewManipulator.cpp:210
osg::Vec3d _center
Definition ViewManipulator.h:98
double getDistance() const
Definition ViewManipulator.cpp:598
virtual osg::Matrixd getInverseMatrix() const
Definition ViewManipulator.cpp:96
void trackball(osg::Vec3d &axis, float &angle, float p1x, float p1y, float p2x, float p2y)
Definition ViewManipulator.cpp:490
bool handleMouseMovement
Definition ViewManipulator.h:108
const osg::Quat & getRotation() const
Definition ViewManipulator.cpp:584
double getWheelZoomFactor() const
Definition ViewManipulator.h:127
double _trackballSize
Definition ViewManipulator.h:102
ViewManipulator(int flags=DEFAULT_SETTINGS)
Constructor.
Definition ViewManipulator.cpp:34
virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode() const
Definition ViewManipulator.cpp:550
virtual void panModel(const float dx, const float dy, const float dz=0.f)
Definition ViewManipulator.cpp:427
virtual void setRotation(const osg::Quat &rotation)
Definition ViewManipulator.cpp:577
double getTrackballSize() const
Definition ViewManipulator.h:125
virtual void setByMatrix(const osg::Matrixd &matrix)
Definition ViewManipulator.cpp:67
osg::Quat _rotation
Definition ViewManipulator.h:99
virtual void setWheelZoomFactor(double wheelZoomFactor)
Definition ViewManipulator.cpp:624
virtual bool performMovementMiddleMouseButton(const double eventTimeDelta, const double dx, const double dy)
Definition ViewManipulator.cpp:303
virtual void setByInverseMatrix(const osg::Matrixd &matrix)
Definition ViewManipulator.cpp:79
double getHeading() const
Returns the heading in radians.
Definition ViewManipulator.cpp:176
virtual void applyAnimationStep(const double currentProgress, const double prevProgress)
Definition ViewManipulator.cpp:333
virtual bool performMouseDeltaMovement(const float dx, const float dy)
Definition ViewManipulator.cpp:321
virtual void setTrackballSize(const double &size)
Definition ViewManipulator.cpp:605
void setElevation(double elevation)
Definition ViewManipulator.cpp:197
double _wheelZoomFactor
Definition ViewManipulator.h:103
virtual bool performMovementRightMouseButton(const double eventTimeDelta, const double dx, const double dy)
Definition ViewManipulator.cpp:313
virtual void getTransformation(osg::Vec3d &eye, osg::Quat &rotation) const
Definition ViewManipulator.cpp:117
double getMinimumDistance(bool *relativeToModelSize=NULL) const
Definition ViewManipulator.cpp:641
virtual void setMinimumDistance(const double &minimumDistance, bool relativeToModelSize=false)
Definition ViewManipulator.cpp:632
float tb_project_to_sphere(float r, float x, float y)
Definition ViewManipulator.cpp:530
void setHeading(double azimuth)
Definition ViewManipulator.cpp:163
virtual void setCenter(const osg::Vec3d ¢er)
Definition ViewManipulator.cpp:563