![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <QPointF>#include <QVector>#include <QtGlobal>#include <algorithm>#include <cstddef>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | OpenSWMM::Render::MeshStaticGeometryBuffers |
| struct | OpenSWMM::Render::MeshStaticGeometryBuffers::Vec2 |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
QSG-2D-1M Phase 5 — persistent static geometry buffers for the 2D mesh / results QSG renderers.
The historical QSG path re-expanded every triangle into three ColoredPoint2D vertices on every content rebuild (pan-back, zoom, time tick, style edit) — ~84 MB of CPU-side vertex assembly per rebuild on a 1M-cell mesh. This builder assembles, ONCE per geometry revision:
Positions are anchor-relative so they stay small in float precision and are invariant under pan/zoom (the renderer's root transform carries the view). Dynamic state (colors / scalars / selection overlays) lives in separate per-pass arrays owned by the renderers — style, data, and selection changes never touch these buffers.
ensureBuilt() is revision-keyed: calling it again with the same revision is a no-op (returns false), which is the contract that makes pan/zoom and data ticks free of static rebuilds. Locked by tests/unit/test_meshstaticgeometrybuffers.cpp.
Header-only, Qt-Core-only.