Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
hugin1/hugin/PreviewDragTool.h
Go to the documentation of this file.00001 // -*- c-basic-offset: 4 -*- 00022 #ifndef _PREVIEWDRAGTOOL_H 00023 #define _PREVIEWDRAGTOOL_H 00024 00025 #include "PreviewTool.h" 00026 00027 #include <map> 00028 #include <hugin_math/Matrix3.h> 00029 00049 class PreviewDragTool : public PreviewTool 00050 { 00051 public: 00052 PreviewDragTool(PreviewToolHelper *helper); 00053 void Activate(); 00054 void MouseMoveEvent(double x, double y, wxMouseEvent & e); 00055 void MouseButtonEvent(wxMouseEvent &e); 00056 void ReallyAfterDrawImagesEvent(); 00057 class ParamStore 00058 { 00059 public: 00060 double yaw, pitch, roll, TrX, TrY; 00061 void Set(HuginBase::SrcPanoImage *img); 00062 void Move(Matrix3 *matrix, 00063 double &yaw_out, double &pitch_out, double &roll_out, double &TrX_out, double &TrY_out); 00064 }; 00065 00066 //dragging mode 00067 enum DragMode { 00068 drag_mode_normal, 00069 drag_mode_mosaic 00070 }; 00071 void setDragMode(DragMode drag_mode); 00072 DragMode getDragMode(); 00073 00074 void getTranslationShift(double &delta_x, double &delta_y); 00075 00076 private: 00077 std::map<unsigned int, ParamStore> image_params; 00078 std::set<unsigned int> draging_images; 00079 bool drag_yaw, drag_pitch, drag_roll; 00080 double start_angle, shift_angle; 00081 hugin_utils::FDiff2D centre, start_coordinates, shift_coordinates; 00082 bool shift, control; 00083 Matrix3 rotation_matrix; 00084 void SetRotationMatrix(double yaw_shift, double pitch_shift, 00085 double roll_shift, 00086 double yaw_start, double pitch_start, 00087 double roll_start); 00088 DragMode drag_mode; 00089 }; 00090 00091 #endif 00092
1.3.9.1