![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Distance-to-feature field sampled as a max-area function. More...
#include <sizefield.h>
Public Member Functions | |
| bool | build (const QRectF &bbox, const QVector< ConstraintSegment > &segs, const QVector< QVector< QPointF > > &rings, const QVector< SteinerPoint > &pts, const SizeFieldOptions &opt) |
| Build the field. Returns false (and leaves the field invalid) when there is nothing to build from — degenerate bbox, no seeds, or nonsensical options. Callers fall back to the uniform cap. | |
| double | targetAreaAt (double x, double y) const |
| bool | isValid () const |
| double | pitch () const |
| int | cols () const |
| int | rows () const |
| double | distanceAt (double x, double y) const |
| double | terrainSizeAt (double x, double y) const |
Distance-to-feature field sampled as a max-area function.
Build once per generation, then install hook.targetAreaAt = [&f](double x, double y){ return f.targetAreaAt(x,y); }. The field must outlive the triangulate() call that samples it.
| bool mesh::SizeField::build | ( | const QRectF & | bbox, |
| const QVector< ConstraintSegment > & | segs, | ||
| const QVector< QVector< QPointF > > & | rings, | ||
| const QVector< SteinerPoint > & | pts, | ||
| const SizeFieldOptions & | opt | ||
| ) |
Build the field. Returns false (and leaves the field invalid) when there is nothing to build from — degenerate bbox, no seeds, or nonsensical options. Callers fall back to the uniform cap.
segs constraint segments (conduits, aux lines) — every edge seeds. rings additional ring paths to seed (valid hole rings). pts Steiner points; only tagged ones (marker != 0) seed.
|
inline |
Distance to the nearest seed at (x, y), bilinear over cell centres. Exposed for tests and diagnostics.
|
inline |
|
inline |
|
inline |
Maximum permitted triangle area at (x, y) — the RefineHook contract. Never returns <= 0 on a valid field (the near-size area is the lower bound), so a graded field always constrains.
Terrain-density size bound at (x, y), or 0 when SizeFieldOptions::terrainDensity was off / no untagged point was given. Exposed for tests and diagnostics.