Hugin trunk 0.1
Loading...
Searching...
No Matches
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.
 
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
 
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

◆ LineDetails()

PreviewLayoutLinesTool::LineDetails::LineDetails ( )

Definition at line 605 of file PreviewLayoutLinesTool.cpp.

Member Function Documentation

◆ draw()

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 578 of file PreviewLayoutLinesTool.cpp.

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

◆ getDistance()

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 613 of file PreviewLayoutLinesTool.cpp.

References threshold().

Member Data Documentation

◆ arc

GreatCircleArc PreviewLayoutLinesTool::LineDetails::arc

◆ dud

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().

◆ image1

unsigned int PreviewLayoutLinesTool::LineDetails::image1

◆ image2

unsigned int PreviewLayoutLinesTool::LineDetails::image2

◆ numberOfControlPoints

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().

◆ totalError

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().

◆ worstError

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: