Function autoware_utils_geometry::test_intersection

Function Documentation

bool autoware_utils_geometry::test_intersection(const std::vector<autoware_utils_geometry::Polygon2d> &polygons1, const std::vector<autoware_utils_geometry::Polygon2d> &polygons2, const std::function<bool(const autoware_utils_geometry::Polygon2d&, const autoware_utils_geometry::Polygon2d&)>&)

checks for collisions between two vectors of convex polygons using a specified collision detection algorithm

Parameters:
  • polygons1 – A vector of convex polygons to check for collisions.

  • polygons2 – A vector of convex polygons to check for collisions.

  • intersection_func – A function that takes two polygons and returns true if they intersect, otherwise false.

Returns:

True if at least one pair of polygons intersects, otherwise false.