Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ShapeFuns.cc

Go to the documentation of this file.
00001 //-*-c++-*-
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 } // namespace

DualCoding 4.0
Generated Thu Nov 22 00:52:36 2007 by Doxygen 1.5.4