![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Undirected graph whose nodes are mesh vertices and whose arcs are boundary edge slots (mesh::edgeSlot(cell, edgeLocal)).
More...
#include <meshboundarygraph.h>
Public Member Functions | |
| QVector< int > | shortestPath (int startSlot, int endSlot) const |
Shortest chain of boundary edge slots from startSlot to endSlot, inclusive of both terminal slots. | |
| bool | isEmpty () const |
| True when the mesh contributed no boundary edges (also the state of a default-constructed graph). | |
| int | edgeCount () const |
| Number of boundary edge slots in the graph. | |
| bool | contains (int slot) const |
True when slot (mesh::edgeSlot(cell, edgeLocal)) is one of them. | |
Static Public Member Functions | |
| static MeshBoundaryGraph | build (const MeshResult &mesh, const QVector< bool > &isBoundary) |
Build from mesh and the flat per-slot boundary flags (isBoundary[mesh::edgeSlot(cell, e)]). Slots outside the flag vector, slots with out-of-range or degenerate vertex indices, are skipped. | |
Undirected graph whose nodes are mesh vertices and whose arcs are boundary edge slots (mesh::edgeSlot(cell, edgeLocal)).
Boundary status is supplied by the caller as the same flat flag vector the layer keeps (buildBoundaryFlags), so marker-tagged internal boundaries participate exactly as they do everywhere else in the app. A marker-tagged internal edge is shared by two triangles and therefore contributes two parallel slots of equal length; either may be returned.
|
static |
Build from mesh and the flat per-slot boundary flags (isBoundary[mesh::edgeSlot(cell, e)]). Slots outside the flag vector, slots with out-of-range or degenerate vertex indices, are skipped.
|
inline |
True when slot (mesh::edgeSlot(cell, edgeLocal)) is one of them.
|
inline |
Number of boundary edge slots in the graph.
|
inline |
True when the mesh contributed no boundary edges (also the state of a default-constructed graph).
| QVector< int > mesh::MeshBoundaryGraph::shortestPath | ( | int | startSlot, |
| int | endSlot | ||
| ) | const |
Shortest chain of boundary edge slots from startSlot to endSlot, inclusive of both terminal slots.
Weight is the 2D segment length in mesh (project-CRS) units of the intermediate edges; the terminal edges are always included and so do not influence the choice of route. Returns an empty vector when either slot is not a boundary edge of this graph, or when the two lie on boundary loops that are not connected to each other. startSlot == endSlot returns that one slot.