OverviewCameraTool.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00023 #ifndef __OVERVIEW_CAMERA_TOOL_H__
00024 #define __OVERVIEW_CAMERA_TOOL_H__
00025 
00026 #include "Tool.h"
00027 #include "ToolHelper.h"
00028 
00029 
00036 class PanosphereOverviewCameraTool : public PanosphereOverviewTool
00037 {
00038     public:
00039         PanosphereOverviewCameraTool(PanosphereOverviewToolHelper* helper) : PanosphereOverviewTool (helper) {}
00040         virtual ~PanosphereOverviewCameraTool() {}
00041 
00042         void Activate();
00043 
00044         void MouseMoveEvent(double x, double y, wxMouseEvent & e);
00045         void MouseButtonEvent(wxMouseEvent &e);
00046         void MouseWheelEvent(wxMouseEvent &);
00047         
00048         void ChangeZoomLevel(bool zoomIn, double scale = 1.1);
00049         void KeypressEvent(int keycode, int modifiers, bool pressed);
00050 
00051     private:
00052 
00053         //lower limit for the distance of the camera with respect to the sphere radius
00054         static const double limit_low;
00055         //upper limit for the distance of the camera with respect to the sphere radius
00056         static const double limit_high;
00057 
00058         bool down;
00059         //starting position of the mouse
00060         double start_x, start_y;
00061         //starting position of the camera
00062         double start_angx, start_angy;
00063 };
00064 
00071 class PlaneOverviewCameraTool : public PlaneOverviewTool
00072 {
00073     public:
00074         PlaneOverviewCameraTool(PlaneOverviewToolHelper * helper) : PlaneOverviewTool (helper) {}
00075         virtual ~PlaneOverviewCameraTool() {}
00076 
00077         void Activate();
00078 
00079         void MouseMoveEvent(double x, double y, wxMouseEvent & e);
00080         void MouseButtonEvent(wxMouseEvent &e);
00081         void MouseWheelEvent(wxMouseEvent &);
00082         
00083         void ChangeZoomLevel(bool zoomIn, double scale = 1.1);
00084         void KeypressEvent(int keycode, int modifiers, bool pressed);
00085 
00086     private:
00087 
00088         int counter;
00089         bool down;
00090         //starting position of the mouse
00091         double start_x, start_y;
00092         //starting position of the camera
00093         double start_pos_x, start_pos_y;
00094 };
00095 
00096 #endif /* __OVERVIEW_DRAG_TOOL_H__ */
00097 

Generated on 25 Oct 2014 for Hugintrunk by  doxygen 1.4.7