38#include <vigra/windows.h>
156 const double line_v[3] = {p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2]};
172 double v[3] = {p1[0] * b + p2[0] * (1.0 - b), p1[1] * b + p2[1] * (1.0 - b), p1[2] * b + p2[2] * (1.0 - b)};
232 for (
unsigned int i = 0 ;
i <
m_lines.size() ;
i++) {
263 double d = width / state->
GetScale() / 2.0;
438 vx = vertices[point].x;
439 vy = vertices[point].y;
469 float distance = std::numeric_limits<float>::max();
470 for (std::vector<GreatCircleArc::LineSegment>::const_iterator
it =
m_lines.begin();
488 if (vertices[0] == vertices[1])
504 return vertices[0].squareDistance(point);
509 return vertices[1].squareDistance(point);
533 double x1, y1, x2, y2;
const unsigned int max_segments
const double min_segment_angle
Declare GreatCircles class.
void draw(bool withCross=true, double width=1.0) const
Draw the great circle arc on the fast preview.
GreatCircleArc()
Create a bad great circle arc.
VisualizationState * m_visualizationState
float squareDistance(hugin_utils::FDiff2D point) const
Return the square of the minimal distance between the great circle arc and a coordinate on the panora...
std::vector< LineSegment > m_lines
GreatCircles()
constructor
void setVisualizationState(VisualizationState *visualizationState)
Set the ViewState to use for information on output projection and preview display.
VisualizationState * m_visualizationState
void drawLineFromSpherical(double startLat, double startLong, double endLat, double endLong, double width=1.0, bool straightLine=false)
Draw the shortest segment of the great circle crossing two spherical coordinates.
unsigned int getWidth() const
All variables of a source image.
a class to handle a 3D point
virtual MeshInfo::Coord3D GetCoord3D(hugin_utils::FDiff2D &)=0
StraightLineFromSphericals(double startLat, double startLong, double endLat, double endLong, VisualizationState &m_visualizationState)
Create a straight line from begin to end in spherical coordinates.
MeshManager * GetMeshManager()
#define DEBUG_ASSERT(cond)
TDiff2D< double > FDiff2D
include file for the hugin project
include file for the hugin project
void doGLcross(int point, double cscale, VisualizationState *state) const
Specify the line to OpenGL. Must be within a glBegin/glEnd pair.
hugin_utils::FDiff2D vertices[2]
float squareDistance(hugin_utils::FDiff2D point) const
Get the square of the minimal distance to a point.
void doGL(double width, VisualizationState *state, LineSegment *preceding=NULL, LineSegment *proceeding=NULL) const
Draw a meshed line.
T squareDistance(TDiff2D< T > other) const
Return square of the distance to another point.
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.