00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef VRS_SG_PANGROUNDPLATENAVIGATION_H
00024 #define VRS_SG_PANGROUNDPLATENAVIGATION_H
00025
00026 #include <vrs/config.h>
00027 #include <vrs/sg/groundplatenavigation.h>
00028
00029 namespace VRS {
00030
00034 class VRS_CORE_API PanGroundPlateNavigation :
00035 public VRS::GroundPlateNavigation
00036 {
00037 public:
00038 VRS_TYPEINFO(PanGroundPlateNavigation, VRS::GroundPlateNavigation);
00039
00040 PanGroundPlateNavigation();
00041
00042 static const MouseButtonFunctionID Panning;
00043
00045 virtual void onDragStart(int x, int y, SO<VRS::ButtonEvent>, MouseButtonFunctionID id);
00046 virtual void onDragMotion(
00047 int x, int y,
00048 SO<VRS::MotionEvent>,
00049 MouseButtonFunctionID id,
00050 int startX, int startY
00051 );
00052
00057 void setMinDragAngle(double degrees = 10.0);
00058 double getMinDragAngle() const;
00059
00060 virtual bool preservingViewDirectionRequired() const;
00061
00062 private:
00063 void findDragPoint(SO<VRS::Canvas> canvas, int x, int y);
00064 VRS::Vector dragPoint_;
00065 bool dragPointValid_;
00066 double minDragAngle_;
00067 };
00068
00069 }
00070
00071 #endif // VRS_SG_PANGROUNDPLATENAVIGATION_H