00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #ifndef GIRLCONTOUR_HPP
00029 #define GIRLCONTOUR_HPP
00030
00031 #include <girl/girlFreemanCodePath.hpp>
00032
00033
00034 namespace girl {
00035
00041 class GIRL_API contour : public freemanCodePath
00042 {
00043 public:
00044
00050 inline contour(const girl::point &startPt = girl::point(0, 0));
00051
00060 inline contour(const girl::point &startPt,
00061 const std::deque<girl::direction> &dirs);
00062
00063
00070 inline void set(const girl::point &startPt,
00071 const std::deque<girl::direction> &dirs);
00072
00073
00077 inline girl::point startPt() const;
00078
00084 inline size_t length() const;
00085
00092 bool isPositivelyOriented() const;
00093
00100 inline void invertOrientation();
00101
00102 };
00103
00104
00105
00106
00107 contour::contour(const girl::point &pStartPt)
00108 : freemanCodePath(pStartPt)
00109 {
00110 assert(isClosed());
00111 }
00112
00113 contour::contour(const girl::point &pStartPt,
00114 const std::deque<girl::direction> &dirs)
00115 : freemanCodePath(pStartPt, dirs)
00116 {
00117 assert(freemanCodePath::isClosed());
00118 }
00119
00120 void
00121 contour::set(const girl::point &pStartPt,
00122 const std::deque<girl::direction> &dirs)
00123 {
00124 freemanCodePath::set(pStartPt, dirs);
00125 assert(freemanCodePath::isClosed());
00126 }
00127
00128
00129 girl::point
00130 contour::startPt() const
00131 {
00132 return freemanCodePath::startPt();
00133 }
00134
00135 size_t
00136 contour::length() const
00137 {
00138 return freemanCodePath::length();
00139 }
00140
00141 void
00142 contour::invertOrientation()
00143 {
00144 freemanCodePath::invertOrientation();
00145 }
00146
00147 }
00148
00149 #endif