![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include "mesh/meshquadquality.h"#include "mesh/meshresult.h"#include <QPair>#include <QSet>#include <QVector>Go to the source code of this file.
Classes | |
| struct | mesh::QuadTemplate |
| Four vertex ids in cyclic (CCW) order. Before the PSLG is built these are meshquadpoints' combined indices; MeshGenerator maps them to Triangle output vertex ids before pairing. More... | |
| struct | mesh::QuadPairingOptions |
| struct | mesh::QuadPairingStats |
Namespaces | |
| namespace | mesh |
Functions | |
| QuadPairingStats | mesh::pairTrianglesIntoQuads (MeshResult &mesh, const QVector< int > &cellIds, const QVector< QuadTemplate > &templates, const QSet< QPair< int, int > > &lockedEdges, const QuadPairingOptions &opts, QVector< int > *oldToNew) |
Pair the triangles cellIds (indices into mesh.triangles; every one must be a triangle) into quads. templates carry OUTPUT vertex ids. lockedEdges (mesh::edgeKey pairs) are never straddled. On return oldToNew (optional) maps every old cell index to its new index (a paired triangle maps to its quad). Region triangles that were not paired keep their tag/mannings/initDepth; a quad inherits them from its first triangle (tags of the two triangles are equal inside a region). | |
| QVector< int > | mesh::maximumMatching (int n, const QVector< QPair< int, int > > &edges) |
Maximum-cardinality matching on a general graph — Edmonds' blossom algorithm (O(V·E)). edges are unordered pairs in [0, n). Returns mate[i] (-1 = unmatched). Exposed for the brute-force cross-check test. | |
| bool | mesh::unionQuad (const QVector< MeshVertex > &vertices, const MeshTriangle &t1, const MeshTriangle &t2, MeshTriangle &quad) |
The CCW quad formed by two triangles sharing edge (p,q): returns false when they do not share exactly two vertices or the union is not a simple quad. quad receives v0..v3 (tag etc. copied from t1). | |
Pairing triangles into quads inside a quad region (workplans/QUAD_MESHING_REDESIGN_PLAN_2026-09-06.md §4.4f) — no external library:
Output honours the engine cell order (triangles first, then quads; existing quads keep their relative order after the new ones are appended behind them — see meshquadmerge.cpp for the same rebuild) and emits every quad CCW. Callers pass all cells of the mesh; only cellIds are touched.