00001
00002
00003 #include "ShapeRoot.h"
00004 #include "ShapeLine.h"
00005 #include "ShapeBlob.h"
00006
00007 #include "ShapeFuns.h"
00008
00009 namespace DualCoding {
00010
00011
00012
00013 bool IsLeftOf::operator() (const ShapeRoot &s1, const ShapeRoot &s2) const {
00014 const Point c1 = s1->getCentroid();
00015 const Point c2 = s2->getCentroid();
00016 return c1.isLeftOf(c2,dist);
00017 }
00018
00019 bool IsAbove::operator() (const ShapeRoot &s1, const ShapeRoot &s2) const {
00020 const Point c1 = s1->getCentroid();
00021 const Point c2 = s2->getCentroid();
00022 return c1.isAbove(c2,dist);
00023 }
00024
00025 }