120 explicit vpPolygon(
const std::vector<vpImagePoint> &corners);
121 explicit vpPolygon(
const std::list<vpImagePoint> &corners);
127 void buildFrom(
const std::vector<vpImagePoint> &corners,
const bool create_convex_hull =
false);
128 void buildFrom(
const std::list<vpImagePoint> &corners,
const bool create_convex_hull =
false);
130 const bool create_convex_hull =
false);
132 unsigned int getSize()
const;
134 unsigned int thickness = 1);
136 unsigned int thickness = 1);
138 bool isInside(
const vpImagePoint &iP,
const PointInPolygonMethod &method = PnPolyRayCasting)
const;
147 const std::vector<vpImagePoint> &
getCorners()
const {
return _corners; }
155 inline double getArea()
const {
return this->_area; }
174 void init(
const std::vector<vpImagePoint> &corners);
175 void init(
const std::list<vpImagePoint> &corners);
178 void updateBoundingBox();
183 void precalcValuesPnPoly();
185 std::vector<double> m_PnPolyConstants;
186 std::vector<double> m_PnPolyMultiples;
193 static bool isInside(
const std::vector<vpImagePoint> &roi,
const double &i,
const double &j,
194 const PointInPolygonMethod &method = PnPolyRayCasting);