|
TraceMaker
C++ API of the engine
|
#include <geom/poly_index.hpp>
Public Member Functions | |
| PolygonIndex ()=default | |
| PolygonIndex (const std::vector< Point > &pts) | |
| bool | disk_closer (Point c, Coord r, Coord clearance) const |
| True if the gap between the disk (centre c, radius r) and the polygon is strictly less than clearance (clearance + r > 0). | |
| bool | shape_closer (const Shape &s, Coord clearance) const |
| Any shape against the polygon. | |
| double | shape_gap (const Shape &s, Coord bound) const |
Definition at line 12 of file poly_index.hpp.
|
default |
|
explicit |
True if the gap between the disk (centre c, radius r) and the polygon is strictly less than clearance (clearance + r > 0).
Any shape against the polygon.
shape_closer(s, clearance) equals closer_than(s, Shape::polygon(pts, 0), clearance); shape_gap(s, bound) equals gap(s, Shape::polygon(pts, 0)) when the two cores are closer than bound (the caller knows that from shape_closer). Both visit only the polygon edges near the shape; the linear functions are the reference path (tests/test_geom.cpp).