ControlPoint.cpp

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00025 #include "ControlPoint.h"
00026 
00027 
00028 namespace HuginBase {
00029 
00030     
00031 bool ControlPoint::operator==(const ControlPoint & o) const
00032 {
00033     return (image1Nr == o.image1Nr &&
00034             image2Nr == o.image2Nr &&
00035             x1 == o.x1 && y1 == o.y1 &&
00036             x2 == o.x2 && y2 == o.y2 &&
00037             mode == o.mode &&
00038             error == o.error);
00039 }
00040 
00041 
00042 void ControlPoint::mirror()
00043 {
00044     unsigned int ti;
00045     double td;
00046     ti =image1Nr; image1Nr = image2Nr, image2Nr = ti;
00047     td = x1; x1 = x2 ; x2 = td;
00048     td = y1; y1 = y2 ; y2 = td;
00049 }
00050 
00051 const std::string ControlPoint::getCPString() const
00052 {
00053     std::ostringstream s;
00054     s << mode;
00055     if(image1Nr<=image2Nr)
00056     {
00057         s << " " << image1Nr << ": " << x1 << "," << y1 << "|" << image2Nr << ": " << x2 << "," <<y2;
00058     }
00059     else
00060     {
00061         s << " " << image2Nr << ": " << x2 << "," << y2 << "|" << image1Nr << ": " << x1 << "," <<y1;
00062     }
00063     return s.str();
00064 };
00065 
00066 } // namespace

Generated on 28 Jul 2016 for Hugintrunk by  doxygen 1.4.7