19 #ifndef OSGGA_CAMERA_MANIPULATOR
20 #define OSGGA_CAMERA_MANIPULATOR 1
22 #include <osgGA/CameraManipulator>
39 UPDATE_MODEL_SIZE = 0x01,
40 COMPUTE_HOME_USING_BBOX = 0x02,
41 PROCESS_MOUSE_WHEEL = 0x04,
42 SET_CENTER_ON_WHEEL_FORWARD_MOVEMENT = 0x08,
43 DEFAULT_SETTINGS = UPDATE_MODEL_SIZE | PROCESS_MOUSE_WHEEL
52 virtual const char*
className()
const {
return "StandardManipulator"; }
70 virtual void setVerticalAxisFixed(
bool value );
71 inline bool getVerticalAxisFixed()
const;
72 inline bool getAllowThrow()
const;
73 virtual void setAllowThrow(
bool allowThrow );
75 virtual void setAnimationTime(
const double t );
76 double getAnimationTime()
const;
77 bool isAnimating()
const;
78 virtual void finishAnimation();
81 virtual void home(
double );
100 virtual bool performMovement();
101 virtual bool performMovementLeftMouseButton(
const double eventTimeDelta,
const double dx,
const double dy );
102 virtual bool performMovementMiddleMouseButton(
const double eventTimeDelta,
const double dx,
const double dy );
103 virtual bool performMovementRightMouseButton(
const double eventTimeDelta,
const double dx,
const double dy );
104 virtual bool performMouseDeltaMovement(
const float dx,
const float dy );
106 virtual void applyAnimationStep(
const double currentProgress,
const double prevProgress );
109 void flushMouseEventStack();
110 virtual bool isMouseMoving()
const;
111 float getThrowScale(
const double eventTimeDelta )
const;
114 static void rotateYawPitch(
osg::Quat& rotation,
const double yaw,
const double pitch,
116 static void fixVerticalAxis(
osg::Quat& rotation,
const osg::Vec3d& localUp,
bool disallowFlipOver );
119 const osg::Vec3d& localUp,
bool disallowFlipOver );
156 void start(
const double startTime );
166 inline bool getRelativeFlag(
int index )
const;
167 inline void setRelativeFlag(
int index,
bool value );
169 static int allocateRelativeFlag();
osg::ref_ptr< osg::Node > _node
osg::ref_ptr< const osgGA::GUIEventAdapter > _ga_t0
osg::ref_ptr< AnimationData > _animationData
static int numRelativeFlagsAllocated
bool getRelativeFlag(int index) const
bool getVerticalAxisFixed() const
Returns whether manipulator preserves camera's "UP" vector.
void setRelativeFlag(int index, bool value)
osg::ref_ptr< const osgGA::GUIEventAdapter > _ga_t1
bool getAllowThrow() const
Returns true if the camera can be thrown, false otherwise. It defaults to true.
virtual const char * className() const
virtual void allocAnimationData()