Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GreatCircles.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
23 #ifndef GREATCIRCLES_H
24 #define GREATCIRCLES_H
25 
26 #include "ViewState.h"
27 #include <vector>
28 #include <hugin_math/hugin_math.h>
29 
36 {
37 public:
39  GreatCircles();
44  void setVisualizationState(VisualizationState * visualizationState);
61  void drawLineFromSpherical(double startLat, double startLong,
62  double endLat, double endLong, double width = 1.0);
63 private:
65 };
66 
68 {
69  public:
81  GreatCircleArc(double startLat, double startLong,
82  double endLat, double endLong,
85  void draw(bool withCross=true, double width = 1.0) const;
89  float squareDistance(hugin_utils::FDiff2D point) const;
90  double m_xscale ;
91  double getxscale() const;
92 
93  struct LineSegment
94  {
97  float squareDistance(hugin_utils::FDiff2D point) const;
99  void doGLcross(int point, double cscale, VisualizationState *state) const;
107  void doGL(double width, VisualizationState *state, LineSegment * preceding = NULL, LineSegment * proceeding = NULL) const;
108  };
109 
110  protected:
111  std::vector<LineSegment> m_lines;
113 
114 };
115 
116 #endif
117 
void drawLineFromSpherical(double startLat, double startLong, double endLat, double endLong, double width=1.0)
Draw the shortest segment of the great circle crossing two spherical coordinates. ...
GreatCircles()
constructor
double getxscale() const
misc math function &amp; classes used by other parts of the program
void doGL(double width, VisualizationState *state, LineSegment *preceding=NULL, LineSegment *proceeding=NULL) const
Draw a meshed line.
VisualizationState * m_visualizationState
Definition: GreatCircles.h:64
void doGLcross(int point, double cscale, VisualizationState *state) const
Specify the line to OpenGL. Must be within a glBegin/glEnd pair.
VisualizationState * m_visualizationState
Definition: GreatCircles.h:112
void setVisualizationState(VisualizationState *visualizationState)
Set the ViewState to use for information on output projection and preview display.
Draw great circle arcs in the fast preview.
Definition: GreatCircles.h:35
GreatCircleArc()
Create a bad great circle arc.
hugin_utils::FDiff2D vertices[2]
Definition: GreatCircles.h:95
std::vector< LineSegment > m_lines
Definition: GreatCircles.h:111
float squareDistance(hugin_utils::FDiff2D point) const
Return the square of the minimal distance between the great circle arc and a coorinate on the panoram...
void draw(bool withCross=true, double width=1.0) const
Draw the great circle arc on the fast preview.
float squareDistance(hugin_utils::FDiff2D point) const
Get the square of the minimal distance to a point.