Segment.cc
Go to the documentation of this file.00001 #include "Segment.h"
00002 #include <iostream>
00003
00004 namespace AprilTags {
00005
00006 const float Segment::minimumLineLength = 4;
00007
00008 Segment::Segment()
00009 : children(), x0(0), y0(0), x1(0), y1(0), theta(0), length(0), segmentId(++idCounter) {}
00010
00011 float Segment::segmentLength() {
00012 return std::sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0));
00013 }
00014
00015 void Segment::printSegment() {
00016 std::cout <<"("<< x0 <<","<< y0 <<"), "<<"("<< x1 <<","<< y1 <<")" << std::endl;
00017 }
00018
00019 int Segment::idCounter = 0;
00020
00021 }