[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin1/hugin/PreviewLayoutLinesTool.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00022 #ifndef PREVIEW_LAYOUT_LINES_TOOL_H
00023 #define PREVIEW_LAYOUT_LINES_TOOL_H
00024 
00025 #include "PreviewTool.h"
00026 #include <vector>
00027 #include <hugin_math/hugin_math.h>
00028 #include "GreatCircles.h"
00029 
00030 class GLPreviewFrame;
00031 
00047 class PreviewLayoutLinesTool : public PreviewTool, public HuginBase::PanoramaObserver
00048 {
00049 public:
00050     PreviewLayoutLinesTool(PreviewToolHelper *helper);
00051     ~PreviewLayoutLinesTool();
00052     
00057     void panoramaChanged(HuginBase::PanoramaData &pano);
00058     void panoramaImagesChanged(HuginBase::PanoramaData&, const HuginBase::UIntSet&);
00059     
00061     void Activate();
00062     
00065     virtual void MouseMoveEvent(double x, double y, wxMouseEvent & e);
00066     
00070     void MouseButtonEvent(wxMouseEvent & e);
00071 
00075     void BeforeDrawImagesEvent();
00076     
00077     bool BeforeDrawImageEvent(unsigned int image);
00078     
00082     void AfterDrawImagesEvent();
00083 private:
00085     bool m_updateStatistics;
00087     unsigned int m_rectangleBorderTex;
00088     
00090     std::vector<hugin_utils::FDiff2D> m_imageCentres;
00091     
00093     std::vector<hugin_utils::FDiff2D> m_imageCentresSpherical;
00094     
00096     std::vector<HuginBase::PTools::Transform *> m_transforms;
00097     
00098     
00101     class LineDetails
00102     {
00103     public:
00105         unsigned int image1, image2;
00106         LineDetails();
00108         unsigned int numberOfControlPoints;
00110         double worstError;
00112         double totalError;
00117         bool dud;
00118         
00119         GreatCircleArc arc;
00120         
00136         void draw(bool highlight);
00137         
00141         float getDistance(hugin_utils::FDiff2D point);
00142     };
00143     
00145     std::vector<LineDetails> m_lines;
00146     
00148     unsigned int m_nearestLine;
00149     
00151     bool m_useNearestLine;
00152     
00154     void updateLineInformation();
00155     
00157     void updateImageCentres();
00158     
00160     void drawIdentificationBorder(unsigned int image);
00161 };
00162 
00163 #endif
00164 

Generated on Mon Sep 20 01:01:26 2010 for Hugintrunk by doxygen 1.3.9.1