Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PreviewCameraTool.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
23 #ifndef __PREVIEW_CAMERA_TOOL_H__
24 #define __PREVIEW_CAMERA_TOOL_H__
25 
26 #include "Tool.h"
27 #include "ToolHelper.h"
28 
29 
35 {
36  public:
38  virtual ~PreviewCameraTool() {};
39 
40  void Activate();
42  void MouseWheelEvent(wxMouseEvent &);
44  void MouseButtonEvent(wxMouseEvent &e);
46  void MouseMoveEvent(double x, double y, wxMouseEvent& e);
47  private:
49  void ChangeZoomLevel(bool zoomIn, const hugin_utils::FDiff2D& scrollPos);
51  void UpdateCenter(const hugin_utils::FDiff2D& moveDist);
52 
54  bool m_moving;
57 };
58 
59 #endif /* __PREVIEW_CAMERA_TOOL_H__ */
60 
tool for the manipulation of the opengl 'camera' properties It handles zooming in/out of the main pre...
void Activate()
Switch on a tool.
void MouseButtonEvent(wxMouseEvent &e)
event for mouse button processing
void MouseWheelEvent(wxMouseEvent &)
event for mouse wheel processing
void MouseMoveEvent(double x, double y, wxMouseEvent &e)
event for mouse move
virtual ~PreviewCameraTool()
void UpdateCenter(const hugin_utils::FDiff2D &moveDist)
update center, used for panning
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition: Tool.h:102
bool m_moving
flag to indicate that we are moving the view with middle mouse button
hugin_utils::FDiff2D m_lastScreenPos
last screen position during moving , needed for real-time update
PreviewCameraTool(PreviewToolHelper *helper)
void ChangeZoomLevel(bool zoomIn, const hugin_utils::FDiff2D &scrollPos)
update zoom level