Function swri_geometry_util::PointInPolygon
Defined in File geometry_util.h
Function Documentation
-
bool swri_geometry_util::PointInPolygon(const std::vector<cv::Vec2d> &polygon, const cv::Vec2d &point)
Test if a point is within the bounds of a polygon.
The polygon is assumed to be non-intersecting and that the vertices are ordered sequentially in clock-wise fashion.
- Parameters:
polygon – [in] The list of polygon vertices.
point – [in] The point.
- Returns:
True if the point is within the bounds of the polygon.