PreviewLayoutLinesTool::LineDetails Class Reference

A class to store information about each line that will be drawn. More...

List of all members.

Public Member Functions

 LineDetails ()
void draw (bool highlight)
 Draw a line in the preview for this pair of images.
float getDistance (hugin_utils::FDiff2D point)
 Get the square of the distance from the arc to some panorama coordinate.

Public Attributes

unsigned int image1
 index of images for this line
unsigned int image2
 index of images for this line
unsigned int numberOfControlPoints
 the number of control points between these images
double worstError
 the error of the control point with the greatest error between these images
double totalError
 the total of all the control point errors between these images
bool dud
 false if the line should be used, true if it shouldn't.
GreatCircleArc arc


Detailed Description

A class to store information about each line that will be drawn.

Definition at line 105 of file PreviewLayoutLinesTool.h.


Constructor & Destructor Documentation

PreviewLayoutLinesTool::LineDetails::LineDetails  ) 
 

Definition at line 600 of file PreviewLayoutLinesTool.cpp.


Member Function Documentation

void PreviewLayoutLinesTool::LineDetails::draw bool  highlight  ) 
 

Draw a line in the preview for this pair of images.

If the line is a dud, no line is drawn.

  • It is coloured grey and 1 pixel thick if there are no control points.
  • The width of the line is max {1 px + NumberOfControlPoints / 5, 5}.
  • The colour of a line with control points is dependant on the maximum error and selection:
    • Red if the error is greater than or equal to 20.
    • Red - Orange - Yellow if the error is between 5 and 20
    • Yellow - Green if the error is less than 5.
    • All lines are drawn white instead if it is the selected line.
      Parameters:
      highlight Prelight for nearest line. Draws the line white when true, otherwise use a colour based on error.

Definition at line 573 of file PreviewLayoutLinesTool.cpp.

References arc, hugin_utils::ControlPointErrorColour(), GreatCircleArc::draw(), numberOfControlPoints, and worstError.

float PreviewLayoutLinesTool::LineDetails::getDistance hugin_utils::FDiff2D  point  ) 
 

Get the square of the distance from the arc to some panorama coordinate.

The point is normally the mouse location in the panorama.

Definition at line 608 of file PreviewLayoutLinesTool.cpp.

References arc, hugin_utils::FDiff2D, and GreatCircleArc::squareDistance().


Member Data Documentation

GreatCircleArc PreviewLayoutLinesTool::LineDetails::arc
 

Definition at line 123 of file PreviewLayoutLinesTool.h.

Referenced by draw(), getDistance(), and PreviewLayoutLinesTool::updateLineInformation().

bool PreviewLayoutLinesTool::LineDetails::dud
 

false if the line should be used, true if it shouldn't.

A dud image is not drawn, and should never be the nearest line to the mouse.

Definition at line 121 of file PreviewLayoutLinesTool.h.

Referenced by PreviewLayoutLinesTool::updateLineInformation().

unsigned int PreviewLayoutLinesTool::LineDetails::image1
 

index of images for this line

Definition at line 109 of file PreviewLayoutLinesTool.h.

Referenced by PreviewLayoutLinesTool::BeforeDrawImageEvent(), PreviewLayoutLinesTool::MouseButtonEvent(), PreviewLayoutLinesTool::MouseMoveEvent(), and PreviewLayoutLinesTool::updateLineInformation().

unsigned int PreviewLayoutLinesTool::LineDetails::image2
 

index of images for this line

Definition at line 109 of file PreviewLayoutLinesTool.h.

Referenced by PreviewLayoutLinesTool::BeforeDrawImageEvent(), PreviewLayoutLinesTool::MouseButtonEvent(), PreviewLayoutLinesTool::MouseMoveEvent(), and PreviewLayoutLinesTool::updateLineInformation().

unsigned int PreviewLayoutLinesTool::LineDetails::numberOfControlPoints
 

the number of control points between these images

Definition at line 112 of file PreviewLayoutLinesTool.h.

Referenced by draw(), and PreviewLayoutLinesTool::updateLineInformation().

double PreviewLayoutLinesTool::LineDetails::totalError
 

the total of all the control point errors between these images

Definition at line 116 of file PreviewLayoutLinesTool.h.

Referenced by PreviewLayoutLinesTool::updateLineInformation().

double PreviewLayoutLinesTool::LineDetails::worstError
 

the error of the control point with the greatest error between these images

Definition at line 114 of file PreviewLayoutLinesTool.h.

Referenced by draw(), and PreviewLayoutLinesTool::updateLineInformation().


The documentation for this class was generated from the following files:
Generated on Sat Jul 26 01:25:52 2014 for Hugintrunk by  doxygen 1.3.9.1