SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
mesh::MeshBoundaryGraph Class Reference

Undirected graph whose nodes are mesh vertices and whose arcs are boundary edge slots (mesh::edgeSlot(cell, edgeLocal)). More...

#include <meshboundarygraph.h>

Collaboration diagram for mesh::MeshBoundaryGraph:

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.
 

Detailed Description

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.

Member Function Documentation

◆ build()

MeshBoundaryGraph mesh::MeshBoundaryGraph::build ( const MeshResult mesh,
const QVector< bool > &  isBoundary 
)
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains()

bool mesh::MeshBoundaryGraph::contains ( int  slot) const
inline

True when slot (mesh::edgeSlot(cell, edgeLocal)) is one of them.

◆ edgeCount()

int mesh::MeshBoundaryGraph::edgeCount ( ) const
inline

Number of boundary edge slots in the graph.

◆ isEmpty()

bool mesh::MeshBoundaryGraph::isEmpty ( ) const
inline

True when the mesh contributed no boundary edges (also the state of a default-constructed graph).

◆ shortestPath()

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.


The documentation for this class was generated from the following files: