Implementation helpers of the native jobs and codecs (failure signalling, work accounting, file publication); not installed and not part of the supported API. More...
Classes | |
| struct | Coordinate |
| Exact hash-map key of an XY point: the bit patterns of its two doubles. More... | |
| struct | CoordinateHash |
| Hash functor for Coordinate keys in unordered containers. More... | |
| class | Input |
| Buffered little-endian binary reader with a running FNV-1a hash and byte count. More... | |
| class | Output |
| Buffered little-endian binary writer with a running FNV-1a hash and byte count. More... | |
| struct | PreparedPatches |
| Quad patches planned before triangulation, with the extra sources they need. More... | |
| class | RegionLimits |
| Bounding-volume hierarchy over quad-region bounding boxes that answers the smallest region spacing touching a footprint. More... | |
| class | SourceChains |
| Finds the chain of mesh edges that covers a straight source segment. More... | |
| struct | Stop |
| Exception object thrown by fail() to abort a native operation. More... | |
| class | Transaction |
| Exclusive temporary output file that commit() publishes atomically at a target path. More... | |
| struct | Work |
| Work-unit budget, workspace-estimate gate and cancellation poll for one operation. More... | |
Functions | |
| bool | validPath (const std::filesystem::path &p) |
| Reject empty paths and paths containing an embedded NUL character. | |
| void | hashBytes (std::uint64_t &hash, const unsigned char *p, std::size_t n) |
| Fold bytes into a running 64-bit FNV-1a hash. | |
| void | appendId (std::vector< std::int64_t > &values, std::int64_t id, std::size_t index) |
| Append one external id to a sparse id array that stays empty while ids are 1, 2, ... | |
| void | appendMarker (std::vector< std::int32_t > &values, std::int32_t marker, std::size_t index) |
| Append one marker to a sparse marker array that stays empty while markers are 0. | |
| std::int64_t | externalId (const std::vector< std::int64_t > &ids, std::size_t index) |
| External id of a record from a possibly empty sparse id array. | |
| std::int64_t | signed64 (std::uint64_t bits) |
| Reinterpret a 64-bit pattern as a two's-complement signed value. | |
| std::int32_t | signed32 (std::uint64_t bits) |
| Reinterpret the low 32 bits of a pattern as a two's-complement signed value. | |
| void | setError (IOReport &r, const Stop &e) |
| Copy a caught Stop into a report. | |
| void | setException (IOReport &r, const std::bad_alloc &) |
Record an allocation failure: status ResourceLimit, code allocation. | |
| void | setException (IOReport &r, const std::exception &e) |
Record any other standard exception: status Failed, code exception. | |
| void | validated (const Mesh &mesh, const IOOptions &o) |
| Run validateMesh() with the options' limits and cancellation poll. | |
| Coordinate | coordinate (Point2 p) |
| Build the exact key of a point, mapping -0.0 to +0.0. | |
| PreparedPatches | preparePatches (const JobRequest &r, const Providers &p, const std::function< double(const Box2 &)> &maximumSize, const std::function< double(const Box2 &)> &tolerance, Work &work, int attempt) |
| Plan the request's fixed, authored and automatic quad patches before triangulation. | |
| void | fail (std::string code, std::string message, RunStatus status=RunStatus::Infeasible) |
| Abort the current native operation by throwing a Stop. | |
| std::uint64_t | edgeKey (Index a, Index b) |
| Order-independent 64-bit key of an undirected edge. | |
| Box2 | box (const Point2 *p, int n) |
| Axis-aligned bounding box of a point array. | |
| bool | meets (const Box2 &a, const Box2 &b) |
| Closed overlap test of two normalized boxes; touching edges or corners count. | |
| bool | finite (Point2 p) |
| Test whether both coordinates are finite. | |
| bool | utf8 (const std::string &s) |
| Check that a byte string is well-formed UTF-8. | |
| double | seconds (std::chrono::steady_clock::time_point start) |
| Elapsed steady-clock time. | |
Variables | |
| constexpr std::uint64_t | hashSeed = 14695981039346656037ull |
| 64-bit FNV-1a offset basis, the starting value of every running hash. | |
Implementation helpers of the native jobs and codecs (failure signalling, work accounting, file publication); not installed and not part of the supported API.
|
inline |
Append one external id to a sparse id array that stays empty while ids are 1, 2, ...
The first id that differs from index + 1 materializes the implicit ids 1..index; every later call then appends.
| [in,out] | values | Id array; empty means sequential one-based ids. |
| [in] | id | External id of record index. |
| [in] | index | Zero-based record number; calls must arrive in order 0, 1, 2, ... |
|
inline |
Append one marker to a sparse marker array that stays empty while markers are 0.
The first nonzero marker materializes index zeros; every later call then appends.
| [in,out] | values | Marker array; empty means all zero. |
| [in] | marker | Marker of record index. |
| [in] | index | Zero-based record number; calls must arrive in order 0, 1, 2, ... |
Axis-aligned bounding box of a point array.
| [in] | p | Borrowed array of at least n points (p[0] is always read). |
| [in] | n | Point count, >= 1. |
|
inline |
Build the exact key of a point, mapping -0.0 to +0.0.
| [in] | p | Point; no tolerance is applied, so distinct doubles give distinct keys. |
Order-independent 64-bit key of an undirected edge.
| [in] | a | One endpoint index. |
| [in] | b | The other endpoint index. |
min(a, b) << 32 | max(a, b).
|
inline |
External id of a record from a possibly empty sparse id array.
| [in] | ids | Id array; empty means sequential one-based ids. |
| [in] | index | Zero-based record number; must be in range when ids is non-empty. |
|
inline |
Abort the current native operation by throwing a Stop.
| [in] | code | Machine-readable failure code, moved into the exception. |
| [in] | message | English explanation, moved into the exception. |
| [in] | status | Report status; Infeasible by default. |
|
inline |
Test whether both coordinates are finite.
| [in] | p | Point to test. |
|
inline |
Fold bytes into a running 64-bit FNV-1a hash.
| [in,out] | hash | Running hash, updated in place. |
| [in] | p | Borrowed bytes; may be null only when n is 0. |
| [in] | n | Number of bytes. |
Closed overlap test of two normalized boxes; touching edges or corners count.
| [in] | a | First box (nonnegative width and height). |
| [in] | b | Second box (nonnegative width and height). |
|
inline |
Plan the request's fixed, authored and automatic quad patches before triangulation.
Outer and hole paths become planning domains and holes, other paths constraint lines, and points on no path become pins. With automatic blocks, a candidate grid over the outer paths' bounding box is sampled from maximumSize and the placed blocks are split into tiles added as background automatic-candidate regions. Fixed patches are validated and assessed. Callbacks run synchronously; their exceptions propagate.
| [in] | r | Borrowed job request; paths must index r.points. |
| [in] | p | Borrowed providers: cancelled, and with a positive terrain tolerance also elevation and terrainBound, are passed to the planner. |
| [in] | maximumSize | Borrowed footprint size bound in XY units (0 = unbounded). |
| [in] | tolerance | Borrowed footprint terrain tolerance in Z units; used only with a positive request terrain tolerance. |
| [in,out] | work | Budget charged for planner work and tiles; also gates the result's workspace estimate. |
| [in] | attempt | Retry number; not used by this function. |
| Stop | on invalid input (path_index, region_geometry), an invalid or cancelled block grid (planning_grid), fixed quads in triangles-only mode (quad_conflict), planning failure (quad_plan, with the planner's Cancelled/ResourceLimit/Infeasible status), invalid fixed patches (fixed_patch), result counts above the job limits (planning_limit), or from work. |
|
inline |
Elapsed steady-clock time.
| [in] | start | Earlier steady_clock reading. |
Copy a caught Stop into a report.
| [in,out] | r | Report whose status, code and message are overwritten. |
| [in] | e | Caught failure. |
|
inline |
Record an allocation failure: status ResourceLimit, code allocation.
| [in,out] | r | Report whose status, code and message are overwritten. |
|
inline |
Record any other standard exception: status Failed, code exception.
| [in,out] | r | Report whose status, code and message are overwritten. |
| [in] | e | Caught exception; its what() text becomes the message. |
|
inline |
Reinterpret the low 32 bits of a pattern as a two's-complement signed value.
| [in] | bits | Bit pattern as read from a file; higher bits are ignored. |
|
inline |
Reinterpret a 64-bit pattern as a two's-complement signed value.
| [in] | bits | Bit pattern as read from a file. |
|
inline |
Check that a byte string is well-formed UTF-8.
| [in] | s | Bytes to check; may be empty or contain NUL. |
Run validateMesh() with the options' limits and cancellation poll.
| [in] | mesh | Borrowed mesh, unchanged. |
| [in] | o | Supplies limits and cancelled. |
| Stop | carrying the validation report's code, message and status when it is not complete. |
|
inline |
Reject empty paths and paths containing an embedded NUL character.
| [in] | p | Path to check. |
|
constexpr |
64-bit FNV-1a offset basis, the starting value of every running hash.