![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <QtGlobal>#include <limits>Go to the source code of this file.
Classes | |
| struct | OpenSWMM::Render::Qsg2DLodInputs |
| struct | OpenSWMM::Render::Qsg2DLodDecision |
| class | OpenSWMM::Render::Qsg2DLodPolicy |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
QSG-2D-1M Phase 3 — deterministic level-of-detail policy for the 2D mesh / results QSG renderers.
decide() maps (viewport, extent, mesh density, sublayer intents) to a bucket plus per-pass visibility decisions:
Far — aggregate/overview-style fill only; no dense wireframe, vertex markers, contour labels, or dense per-cell velocity glyphs. Mid — exact fill; contours/vectors allowed with caps; edges only when cells are big enough for a wireframe to read. Near — exact everything the user asked for.
Selected-element overlays are ALWAYS drawn when a selection exists, regardless of bucket, so hidden dense passes never hide the selection.
The decision also carries a contentKey() — bucket plus a quantised zoom octave — that the renderers use as the rebuild key: zooming re-creates content only when the key changes (or the view leaves the coverage rect content was built for), never on every wheel tick. Both the bucket and the octave apply hysteresis against the previous decision so sub-percent zoom jitter can never oscillate the key.
Pure Qt-Core header + .cpp — no Qt Quick / Gui dependency; unit-tested in tests/unit/test_qsg2d_lodpolicy.cpp.