![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
A cell in the mesh — a triangle or (since the engine's mixed tri-quad meshes, workplans/TRI_QUAD_MESHING_PLAN_2026-09-06.md) a convex quadrilateral — indices into MeshResult::vertices. More...
#include <meshresult.h>
Public Member Functions | |
| bool | isQuad () const noexcept |
| int | vertexCount () const noexcept |
| int | vertex (int k) const noexcept |
| void | setVertex (int k, int v) noexcept |
| bool | hasVertex (int v) const noexcept |
Public Attributes | |
| int | v0 = 0 |
| int | v1 = 0 |
| int | v2 = 0 |
| int | v3 = -1 |
| Fourth vertex of a quadrilateral; -1 = triangle. | |
| QString | tag |
| double | mannings = std::numeric_limits<double>::quiet_NaN() |
| double | initDepth = std::numeric_limits<double>::quiet_NaN() |
A cell in the mesh — a triangle or (since the engine's mixed tri-quad meshes, workplans/TRI_QUAD_MESHING_PLAN_2026-09-06.md) a convex quadrilateral — indices into MeshResult::vertices.
The historical name is kept: every consumer that reads v0/v1/v2 still compiles, and a quad simply carries a fourth vertex v3 >= 0 (cyclic order, either orientation). Use vertexCount / vertex and the helpers in mesh/meshcellgeom.h (edgeEndpoints, edgeSlot, cellGeom) instead of hard-coding 3.
Engine contract (plans/2D_TRI_QUAD_MESH_PLAN_2026-09-06.md): cells are written triangles first, then quads ([2D_TRIANGLES] then [2D_QUADS]); local edge k has endpoints v[(k+1)nv], v[(k+2)nv] — for a triangle the old "edge opposite vertex" rule. MeshResult::triangles keeps the engine's cell order.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Initial water depth in m ([2D_TRIANGLES] INIT_DEPTH, written between MANNINGS_N and TAG). NaN = unset (column absent on load) — treated as the engine default 0 (dry) and omitted on write unless any triangle carries a depth or a tag (TAG position must stay unambiguous).
Manning's roughness ([2D_TRIANGLES] MANNINGS_N). NaN = unset, so the writer falls back to the caller's default (mesh generation uses a uniform value); a loaded mesh carries the per-triangle value.
| QString mesh::MeshTriangle::tag |
Region tag (e.g. subcatchment ID); empty if untagged.
| int mesh::MeshTriangle::v0 = 0 |
| int mesh::MeshTriangle::v1 = 0 |
| int mesh::MeshTriangle::v2 = 0 |
| int mesh::MeshTriangle::v3 = -1 |
Fourth vertex of a quadrilateral; -1 = triangle.