GreatCircles.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00023 #ifndef GREATCIRCLES_H
00024 #define GREATCIRCLES_H
00025 
00026 #include "ViewState.h"
00027 #include <vector>
00028 #include <hugin_math/hugin_math.h>
00029 
00035 class GreatCircles
00036 {
00037 public:
00039     GreatCircles();
00044     void setVisualizationState(VisualizationState * visualizationState);
00061     void drawLineFromSpherical(double startLat, double startLong,
00062                                double endLat, double endLong, double width = 1.0);
00063 private:
00064     VisualizationState * m_visualizationState;
00065 };
00066 
00067 class GreatCircleArc
00068 {
00069     public:
00074         GreatCircleArc();
00081         GreatCircleArc(double startLat, double startLong,
00082                        double endLat, double endLong,
00083                        VisualizationState & m_visualizationState);
00085         void draw(bool withCross=true, double width = 1.0) const;
00089         float squareDistance(hugin_utils::FDiff2D point) const;
00090                 double m_xscale ;
00091                 double getxscale() const;
00092 
00093         struct LineSegment
00094         {
00095             hugin_utils::FDiff2D vertices[2];
00097             float squareDistance(hugin_utils::FDiff2D point) const;
00099                         void doGLcross(int point, double cscale, VisualizationState *state) const;
00107             void doGL(double width, VisualizationState *state, LineSegment * preceding = NULL, LineSegment * proceeding = NULL) const;
00108         };
00109 
00110     protected:
00111         std::vector<LineSegment> m_lines;
00112         VisualizationState * m_visualizationState;
00113                 
00114 };
00115 
00116 #endif
00117 

Generated on 2 Aug 2015 for Hugintrunk by  doxygen 1.4.7