![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Depth-weighted, wet-masked free-surface reconstruction at mesh vertices — the GUI mirror of the engine's reconstructVertexRenderDepths (VertexReconstruction.cpp), used when a results source carries no /Mesh2_node_depth field. More...
#include <algorithm>#include <array>#include <cmath>#include <vector>Go to the source code of this file.
Classes | |
| struct | VertexDepthReconstruct::CellSplit |
| One cell of a mixed triangle/quad mesh, pre-split for the reconstruction (workplans/TRI_QUAD_MESHING_PLAN_2026-09-06.md). More... | |
Namespaces | |
| namespace | VertexDepthReconstruct |
Functions | |
| double | VertexDepthReconstruct::cellEtaFromMeanDepth (double h, double za, double zb, double zc) |
| double | VertexDepthReconstruct::triMeanDepthFromEta (double eta, double za, double zb, double zc) |
| double | VertexDepthReconstruct::quadEtaFromMeanDepth (const double zs[6], double a1, double a2, double h) |
| void | VertexDepthReconstruct::reconstructVertexSignedDepths (const std::vector< CellSplit > &cells, const std::vector< float > &cellDepths, const std::vector< float > &cellZc, const std::vector< double > &vz, float dryF, std::vector< float > &vsum, std::vector< float > &wsum, std::vector< float > &outVertexDepth) |
| Reconstruct per-vertex SIGNED depths (η_v − z_v) from per-cell mean depths on a mixed triangle/quad mesh. | |
| void | VertexDepthReconstruct::reconstructVertexSignedDepths (const std::vector< std::array< int, 3 > > &tris, const std::vector< float > &cellDepths, const std::vector< float > &cellZc, const std::vector< double > &vz, float dryF, std::vector< float > &vsum, std::vector< float > &wsum, std::vector< float > &outVertexDepth) |
| void | VertexDepthReconstruct::extrapolateDryCorners (double z0, double z1, double z2, float &sd0, float &sd1, float &sd2) |
| Replace the NO-DATA sentinel at a partially-wet cell's dry corners with the extrapolated signed depth, in place. | |
Depth-weighted, wet-masked free-surface reconstruction at mesh vertices — the GUI mirror of the engine's reconstructVertexRenderDepths (VertexReconstruction.cpp), used when a results source carries no /Mesh2_node_depth field.
Turns per-cell mean depths into per-vertex SIGNED depths (η_v − z_v). Shared by the per-frame animated fill (applyCurrentDepths_) and the historical max-depth envelope (maxDepthPerVertex) so the two cannot drift: the envelope is then provably the per-vertex temporal max of the EXACT field the animation displays.
Weighting η by the cell depth h lets deep, fully-wet cells (whose flat-cell η equals the true horizontal water level) dominate shoreline vertices instead of thin, transiently-wet cells up a slope dragging the surface up the wall. A wet cell additionally votes at a corner only when its water actually reaches it (wetted-contact gate, η > z_v) — without the gate a thin film pooled at a wall base stamps its low η onto the wall-top vertex, notching interpolated surfaces near walls. The emitted field is therefore positive or the 0 no-data sentinel; readers stay tolerant of negatives from files written by older engines.
Header-only so SWMM2DResultsLayer and the unit tests share one implementation (the layer's link closure is too large to drive from a leaf test — same pattern as cellsurfaceinterp.h).