graphs representing rain basins on the mesh More...
#include <MRWatershedGraph.h>
Classes | |
| struct | BasinInfo |
| associated with each vertex in graph More... | |
| struct | BdInfo |
| associated with each edge in graph More... | |
| struct | OverflowPoint |
| describes a point where a flow from one basin overflows into another basin More... | |
Public Member Functions | |
| MRMESH_API | WatershedGraph (const Mesh &mesh, const Vector< int, FaceId > &face2basin, int numBasins) |
| constructs the graph from given mesh, heights in z-coordinate, and initial subdivision on basins | |
| MRMESH_API float | getHeightAt (VertId v) const |
| returns height at given vertex or FLT_MAX if the vertex is invalid | |
| const Graph & | graph () const |
| returns underlying graph where each basin is a vertex | |
| float | totalArea () const |
| returns total precipitation area | |
| int | numBasins () const |
| returns the current number of basins (excluding special "outside" basin) | |
| const BasinInfo & | basinInfo (Graph::VertId v) const |
| returns data associated with given basin | |
| BasinInfo & | basinInfo (Graph::VertId v) |
| const BdInfo & | bdInfo (Graph::EdgeId e) const |
| returns data associated with given boundary between basins | |
| BdInfo & | bdInfo (Graph::EdgeId e) |
| Graph::VertId | outsideId () const |
| returns special "basin" representing outside areas of the mesh | |
| MRMESH_API Graph::VertId | getRootBasin (Graph::VertId v) const |
| for valid basin returns self id; for invalid basin returns the id of basin it was merged in | |
| MRMESH_API Graph::VertId | flowsTo (Graph::VertId v) const |
| returns the basin where the flow from this basin goes next (it can be self id if the basin is not full yet) | |
| MRMESH_API Graph::VertId | flowsFinallyTo (Graph::VertId v, bool exceptOutside=false) const |
| MRMESH_API void | setParentsToRoots () |
| MRMESH_API std::pair< Graph::EdgeId, float > | findLowestBd () const |
| MRMESH_API Graph::VertId | merge (Graph::VertId v0, Graph::VertId v1) |
| merges basin v1 into basin v0, v1 is deleted after that, returns v0 | |
| MRMESH_API Graph::VertId | mergeViaBd (Graph::EdgeId bd) |
| merges two basins sharing given boundary, returns remaining basin | |
| MRMESH_API FaceBitSet | getBasinFaces (Graph::VertId basin) const |
| returns the mesh faces of given basin | |
| MRMESH_API Vector< FaceBitSet, Graph::VertId > | getAllBasinFaces (bool joinOverflowBasins=false) const |
| MRMESH_API FaceBitSet | getBasinFacesBelowLevel (Graph::VertId basin, float waterLevel) const |
| returns the mesh faces of given basin with at least one vertex below given level | |
| MRMESH_API double | computeBasinVolume (Graph::VertId basin, float waterLevel) const |
| MRMESH_API UndirectedEdgeBitSet | getInterBasinEdges (bool joinOverflowBasins=false) const |
| MRMESH_API std::vector< OverflowPoint > | getOverflowPoints () const |
| returns all overflow points in the graph | |
| MRMESH_API Vector< Graph::VertId, Graph::VertId > | iniBasin2Tgt (bool joinOverflowBasins=false) const |
graphs representing rain basins on the mesh