Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
PreviewLayoutLinesTool::LineDetails Class Reference

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

Public Member Functions

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

Public Attributes

unsigned int image1
 index of images for this line More...
 
unsigned int image2
 
unsigned int numberOfControlPoints
 the number of control points between these images More...
 
double worstError
 the error of the control point with the greatest error between these images More...
 
double totalError
 the total of all the control point errors between these images More...
 
bool dud
 false if the line should be used, true if it shouldn't. More...
 
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
      highlightPrelight 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(), dud, 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.

Member Data Documentation

GreatCircleArc PreviewLayoutLinesTool::LineDetails::arc
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 draw(), and PreviewLayoutLinesTool::updateLineInformation().

unsigned int PreviewLayoutLinesTool::LineDetails::image1
unsigned int PreviewLayoutLinesTool::LineDetails::image2
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: