MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.ConstWatershedGraph Class Reference
Inheritance diagram for mrmeshpy.ConstWatershedGraph:

Classes

class  BasinInfo
class  BdInfo
class  ConstBasinInfo
class  ConstBdInfo
class  ConstOverflowPoint
class  OverflowPoint

Public Member Functions

 __init__ (self, *args, **kwargs)
WatershedGraph.ConstBasinInfo basinInfo (self, ConstGraphVertId v)
WatershedGraph.ConstBdInfo bdInfo (self, ConstGraphEdgeId e)
float computeBasinVolume (self, ConstGraphVertId basin, float waterLevel)
tuple[GraphEdgeId, float] findLowestBd (self)
GraphVertId flowsFinallyTo (self, ConstGraphVertId v, bool exceptOutside=False)
GraphVertId flowsTo (self, ConstGraphVertId v)
Vector_FaceBitSet_GraphVertId getAllBasinFaces (self, bool joinOverflowBasins=False)
FaceBitSet getBasinFaces (self, ConstGraphVertId basin)
FaceBitSet getBasinFacesBelowLevel (self, ConstGraphVertId basin, float waterLevel)
float getHeightAt (self, ConstVertId v)
UndirectedEdgeBitSet getInterBasinEdges (self, bool joinOverflowBasins=False)
std_vector_WatershedGraph_OverflowPoint getOverflowPoints (self)
GraphVertId getRootBasin (self, ConstGraphVertId v)
ConstGraph graph (self)
Vector_GraphVertId_GraphVertId iniBasin2Tgt (self, bool joinOverflowBasins=False)
int numBasins (self)
GraphVertId outsideId (self)
float totalArea (self)

Detailed Description

Generated from:  MR::WatershedGraph

graphs representing rain basins on the mesh

Constructor & Destructor Documentation

◆ __init__()

mrmeshpy.ConstWatershedGraph.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrmeshpy.ConstWatershedGraph, mesh: meshlib.mrmeshpy.ConstMesh, face2basin: meshlib.mrmeshpy.ConstVector_int_FaceId, numBasins: int) -> None

constructs the graph from given mesh, heights in z-coordinate, and initial subdivision on basins

2. __init__(self: meshlib.mrmeshpy.ConstWatershedGraph, arg0: meshlib.mrmeshpy.ConstWatershedGraph) -> None

Implicit copy constructor.

3. __init__(self: meshlib.mrmeshpy.ConstWatershedGraph, : meshlib.mrmeshpy.ConstWatershedGraph) -> None

Member Function Documentation

◆ basinInfo()

WatershedGraph.ConstBasinInfo mrmeshpy.ConstWatershedGraph.basinInfo ( self,
ConstGraphVertId v )
returns data associated with given basin

Reimplemented in mrmeshpy.WatershedGraph, and mrmeshpy.WatershedGraph.

◆ bdInfo()

WatershedGraph.ConstBdInfo mrmeshpy.ConstWatershedGraph.bdInfo ( self,
ConstGraphEdgeId e )
returns data associated with given boundary between basins

Reimplemented in mrmeshpy.WatershedGraph, and mrmeshpy.WatershedGraph.

◆ computeBasinVolume()

float mrmeshpy.ConstWatershedGraph.computeBasinVolume ( self,
ConstGraphVertId basin,
float waterLevel )
returns water volume in basin when its surface reaches given level, which must be in between
the lowest basin level and the lowest level on basin's boundary

◆ findLowestBd()

tuple[GraphEdgeId, float] mrmeshpy.ConstWatershedGraph.findLowestBd ( self)
finds the lowest boundary between basins and its height, which is defined
as the minimal different between lowest boundary point and lowest point in a basin

◆ flowsFinallyTo()

GraphVertId mrmeshpy.ConstWatershedGraph.flowsFinallyTo ( self,
ConstGraphVertId v,
bool exceptOutside = False )
returns the basin where the flow from this basin finally goes (it can be self id if the basin is not full yet);
\\param exceptOutside if true then the method returns the basin that receives water flow from (v) just before outside

◆ flowsTo()

GraphVertId mrmeshpy.ConstWatershedGraph.flowsTo ( self,
ConstGraphVertId v )
returns the basin where the flow from this basin goes next (it can be self id if the basin is not full yet)

◆ getAllBasinFaces()

Vector_FaceBitSet_GraphVertId mrmeshpy.ConstWatershedGraph.getAllBasinFaces ( self,
bool joinOverflowBasins = False )
returns the mesh faces of each valid basin;
\\param joinOverflowBasins if true then overflowing basins will be merged in the target basins (except for overflow in outside)

◆ getBasinFaces()

FaceBitSet mrmeshpy.ConstWatershedGraph.getBasinFaces ( self,
ConstGraphVertId basin )
returns the mesh faces of given basin

◆ getBasinFacesBelowLevel()

FaceBitSet mrmeshpy.ConstWatershedGraph.getBasinFacesBelowLevel ( self,
ConstGraphVertId basin,
float waterLevel )
returns the mesh faces of given basin with at least one vertex below given level

◆ getHeightAt()

float mrmeshpy.ConstWatershedGraph.getHeightAt ( self,
ConstVertId v )
returns height at given vertex or FLT_MAX if the vertex is invalid

◆ getInterBasinEdges()

UndirectedEdgeBitSet mrmeshpy.ConstWatershedGraph.getInterBasinEdges ( self,
bool joinOverflowBasins = False )
returns the mesh edges between current basins
\\param joinOverflowBasins if true then overflowing basins will be merged in the target basins (except for overflow in outside)

◆ getOverflowPoints()

std_vector_WatershedGraph_OverflowPoint mrmeshpy.ConstWatershedGraph.getOverflowPoints ( self)
returns all overflow points in the graph

◆ getRootBasin()

GraphVertId mrmeshpy.ConstWatershedGraph.getRootBasin ( self,
ConstGraphVertId v )
for valid basin returns self id; for invalid basin returns the id of basin it was merged in

◆ graph()

ConstGraph mrmeshpy.ConstWatershedGraph.graph ( self)
returns underlying graph where each basin is a vertex

◆ iniBasin2Tgt()

Vector_GraphVertId_GraphVertId mrmeshpy.ConstWatershedGraph.iniBasin2Tgt ( self,
bool joinOverflowBasins = False )
computes a map from initial basin id to a valid basin in which it was merged
\\param joinOverflowBasins if true then overflowing basins will be merged in the target basins (except for overflow in outside)

◆ numBasins()

int mrmeshpy.ConstWatershedGraph.numBasins ( self)
returns the current number of basins (excluding special "outside" basin)

◆ outsideId()

GraphVertId mrmeshpy.ConstWatershedGraph.outsideId ( self)
returns special "basin" representing outside areas of the mesh

◆ totalArea()

float mrmeshpy.ConstWatershedGraph.totalArea ( self)
returns total precipitation area

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