Function polygon_utils::isInside

Function Documentation

bool polygon_utils::isInside(const polygon_msgs::msg::Polygon2D &polygon, const double x, const double y)

Check if a given point is inside of a polygon.

Borders are considered outside.

Parameters:
  • polygon – Polygon to check

  • x – x coordinate

  • y – y coordinate

Returns:

true if point is inside polygon