|
TraceMaker
C++ API of the engine
|
Conservative occupancy raster per side (cell 0.05–0.1 mm). More...
#include <place/legality.hpp>
Public Member Functions | |
| Raster (const Problem &p, Coord cell) | |
| void | add (int part, Point pos, int rot, int delta) |
| delta = +1 insert, -1 remove | |
| bool | free (int part, Point pos, int rot) const |
| summed-area tables: O(shapes) per call | |
| bool | free_reference (int part, Point pos, int rot) const |
| cell scan (reference path for tests) | |
| Coord | cell () const |
| double | inside_fraction (int side) const |
| Fraction of cells inside the board on side s (for diagnostics). | |
Conservative occupancy raster per side (cell 0.05–0.1 mm).
free() returning true proves that the part is legal against the board and every part in the raster; false means "maybe illegal" (run the exact test).
Definition at line 78 of file legality.hpp.
| void tmk::place::Raster::add | ( | int | part, |
| Point | pos, | ||
| int | rot, | ||
| int | delta ) |
delta = +1 insert, -1 remove
|
inline |
Definition at line 84 of file legality.hpp.
| bool tmk::place::Raster::free | ( | int | part, |
| Point | pos, | ||
| int | rot ) const |
summed-area tables: O(shapes) per call
| bool tmk::place::Raster::free_reference | ( | int | part, |
| Point | pos, | ||
| int | rot ) const |
cell scan (reference path for tests)
| double tmk::place::Raster::inside_fraction | ( | int | side | ) | const |
Fraction of cells inside the board on side s (for diagnostics).