Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ControlPoint.cpp
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
25 #include "ControlPoint.h"
26 
27 
28 namespace HuginBase {
29 
30 
32 {
33  return (image1Nr == o.image1Nr &&
34  image2Nr == o.image2Nr &&
35  x1 == o.x1 && y1 == o.y1 &&
36  x2 == o.x2 && y2 == o.y2 &&
37  mode == o.mode &&
38  error == o.error);
39 }
40 
41 
43 {
44  unsigned int ti;
45  double td;
46  ti =image1Nr; image1Nr = image2Nr, image2Nr = ti;
47  td = x1; x1 = x2 ; x2 = td;
48  td = y1; y1 = y2 ; y2 = td;
49 }
50 
51 const std::string ControlPoint::getCPString() const
52 {
53  std::ostringstream s;
54  s << mode;
55  if(image1Nr<=image2Nr)
56  {
57  s << " " << image1Nr << ": " << x1 << "," << y1 << "|" << image2Nr << ": " << x2 << "," <<y2;
58  }
59  else
60  {
61  s << " " << image2Nr << ": " << x2 << "," << y2 << "|" << image1Nr << ": " << x1 << "," <<y1;
62  }
63  return s.str();
64 };
65 
66 } // namespace
represents a control point
Definition: ControlPoint.h:38
const std::string getCPString() const
returns string which contains all features of a control point used for detecting duplicate control po...
bool operator==(const ControlPoint &o) const
void mirror()
swap (image1Nr,x1,y1) with (image2Nr,x2,y2)