MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / convexHull

Method convexHull

grid_map_core/src/Polygon.cpp:289–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289Polygon Polygon::convexHull(Polygon& polygon1, Polygon& polygon2)
290{
291 std::vector<Position> vertices;
292 vertices.reserve(polygon1.nVertices() + polygon2.nVertices());
293 vertices.insert(vertices.end(), polygon1.getVertices().begin(), polygon1.getVertices().end());
294 vertices.insert(vertices.end(), polygon2.getVertices().begin(), polygon2.getVertices().end());
295
296 return monotoneChainConvexHullOfPoints(vertices);
297}
298
299Polygon Polygon::monotoneChainConvexHullOfPoints(const std::vector<Position>& points)
300{

Callers

nothing calls this directly

Calls 2

nVerticesMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected