Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DragTool.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
23 #ifndef _PREVIEWDRAGTOOL_H
24 #define _PREVIEWDRAGTOOL_H
25 
26 #include "Tool.h"
27 
28 #include <map>
29 #include <hugin_math/Matrix3.h>
30 
50 class DragTool : public Tool
51 {
52 public:
53  explicit DragTool(ToolHelper *helper);
54  void Activate();
55  void MouseMoveEvent(double x, double y, wxMouseEvent & e);
56  void MouseButtonEvent(wxMouseEvent &e);
57 
58  virtual void ReallyAfterDrawImagesEvent() = 0;
59 
60  class ParamStore
61  {
62  public:
63  double yaw, pitch, roll, TrX, TrY, TrZ, Tpy, Tpp;
64  void Set(HuginBase::SrcPanoImage *img);
65  void Move(Matrix3 *matrix,
66  double &yaw_out, double &pitch_out, double &roll_out, double &TrX_out, double &TrY_out, double &TrZ_out,
67  double &Tpy_out, double &Tpp_out);
68  };
69 
70  //dragging mode
71  enum DragMode {
74  };
77 
78  void getTranslationShift(double &delta_x, double &delta_y);
79 
80 protected:
81  std::map<unsigned int, ParamStore> image_params;
82  std::set<unsigned int> draging_images;
86  bool shift, control;
88  void SetRotationMatrix(double yaw_shift, double pitch_shift,
89  double roll_shift,
90  double yaw_start, double pitch_start,
91  double roll_start);
94 };
95 
96 class PreviewDragTool : public DragTool
97 {
98 public:
100 
102 
103 };
104 
106 {
107 public:
109 
111 
112 };
113 
114 #endif
115 
DragTool(ToolHelper *helper)
Definition: DragTool.cpp:42
bool drag_roll
Definition: DragTool.h:83
DragMode drag_mode
Definition: DragTool.h:92
void MouseMoveEvent(double x, double y, wxMouseEvent &e)
Notify when the mouse pointer has moved over the panorama preview.
Definition: DragTool.cpp:81
std::set< unsigned int > draging_images
Definition: DragTool.h:82
general : Matrix3 is a class for handling 3x3 Matrix manipulation.
Definition: Matrix3.h:37
hugin_utils::FDiff2D start_coordinates
Definition: DragTool.h:85
OverviewDragTool(OverviewToolHelper *helper)
Definition: DragTool.h:108
Matrix3 rotation_matrix
Definition: DragTool.h:87
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition: Tool.h:102
std::map< unsigned int, ParamStore > image_params
Definition: DragTool.h:81
bool control
Definition: DragTool.h:86
Definition: Tool.h:42
hugin_utils::FDiff2D centre
Definition: DragTool.h:85
void getTranslationShift(double &delta_x, double &delta_y)
Definition: DragTool.cpp:58
void Move(Matrix3 *matrix, double &yaw_out, double &pitch_out, double &roll_out, double &TrX_out, double &TrY_out, double &TrZ_out, double &Tpy_out, double &Tpp_out)
Definition: DragTool.cpp:376
bool drag_yaw
Definition: DragTool.h:83
void ReallyAfterDrawImagesEvent()
Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
Definition: DragTool.cpp:496
bool drag_pitch
Definition: DragTool.h:83
bool custom_drag
Definition: DragTool.h:93
double start_angle
Definition: DragTool.h:84
void Activate()
Switch on a tool.
Definition: DragTool.cpp:69
void setDragMode(DragMode drag_mode)
Definition: DragTool.cpp:47
PreviewDragTool(PreviewToolHelper *helper)
Definition: DragTool.h:99
void SetRotationMatrix(double yaw_shift, double pitch_shift, double roll_shift, double yaw_start, double pitch_start, double roll_start)
Definition: DragTool.cpp:417
DragMode getDragMode()
Definition: DragTool.cpp:52
void MouseButtonEvent(wxMouseEvent &e)
Notify of a mouse button press on the panorama preview.
Definition: DragTool.cpp:161
void Set(HuginBase::SrcPanoImage *img)
Definition: DragTool.cpp:364
virtual void ReallyAfterDrawImagesEvent()=0
Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
Allows the user to change the yaw, pitch and roll of a connected component of images by dragging them...
Definition: DragTool.h:50
All variables of a source image.
Definition: SrcPanoImage.h:194
hugin_utils::FDiff2D shift_coordinates
Definition: DragTool.h:85
bool shift
Definition: DragTool.h:86
void ReallyAfterDrawImagesEvent()
Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
Definition: DragTool.cpp:435
double shift_angle
Definition: DragTool.h:84