Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

GLineSegment2D.h

Go to the documentation of this file.
00001 #ifndef GLINESEGMENT2D_H
00002 #define GLINESEGMENT2D_H
00003 
00004 #include <algorithm>
00005 #include <cfloat>
00006 #include <cmath>
00007 #include <utility>
00008 
00009 #include "GLine2D.h"
00010 #include "XYWeight.h"
00011 
00012 namespace AprilTags {
00013 
00014 //! A 2D line with endpoints.
00015 class GLineSegment2D {
00016 public:
00017   GLineSegment2D(const std::pair<float,float> &p0Arg, const std::pair<float,float> &p1Arg);
00018   static GLineSegment2D lsqFitXYW(const std::vector<XYWeight>& xyweight);
00019   std::pair<float,float> getP0() const { return p0; }
00020   std::pair<float,float> getP1() const { return p1; }
00021 
00022 private:
00023   GLine2D line;
00024   std::pair<float,float> p0;
00025   std::pair<float,float> p1;
00026   int weight;
00027 };
00028 
00029 } // namespace
00030 
00031 #endif

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:41 2016 by Doxygen 1.6.3