MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.WatershedGraph Class Reference
Inheritance diagram for meshlib.WatershedGraph:

Public Member Functions

 WatershedGraph (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 WatershedGraph (meshlib.WatershedGraph _other)
 WatershedGraph (meshlib.Mesh mesh, meshlib.Vector_int_MR_FaceId face2basin, int numBasins)
float getHeightAt (meshlib.VertId v)
meshlib.Graph graph ()
float totalArea ()
int numBasins ()
meshlib.WatershedGraph_BasinInfo basinInfo (meshlib.GraphVertId v)
meshlib.WatershedGraph_BasinInfo basinInfo_mut (meshlib.GraphVertId v)
meshlib.WatershedGraph_BdInfo bdInfo (meshlib.GraphEdgeId e)
meshlib.WatershedGraph_BdInfo bdInfo_mut (meshlib.GraphEdgeId e)
meshlib.GraphVertId outsideId ()
meshlib.GraphVertId getRootBasin (meshlib.GraphVertId v)
meshlib.GraphVertId flowsTo (meshlib.GraphVertId v)
meshlib.GraphVertId flowsFinallyTo (meshlib.GraphVertId v, java.lang.Boolean exceptOutside)
void setParentsToRoots ()
meshlib.std_pair_MR_GraphEdgeId_float findLowestBd ()
meshlib.GraphVertId merge (meshlib.GraphVertId v0, meshlib.GraphVertId v1)
meshlib.GraphVertId mergeViaBd (meshlib.GraphEdgeId bd)
meshlib.FaceBitSet getBasinFaces (meshlib.GraphVertId basin)
meshlib.Vector_MR_FaceBitSet_MR_GraphVertId getAllBasinFaces (java.lang.Boolean joinOverflowBasins)
meshlib.FaceBitSet getBasinFacesBelowLevel (meshlib.GraphVertId basin, float waterLevel)
double computeBasinVolume (meshlib.GraphVertId basin, float waterLevel)
meshlib.UndirectedEdgeBitSet getInterBasinEdges (java.lang.Boolean joinOverflowBasins)
meshlib.std_vector_MR_WatershedGraph_OverflowPoint getOverflowPoints ()
meshlib.Vector_MR_GraphVertId_MR_GraphVertId iniBasin2Tgt (java.lang.Boolean joinOverflowBasins)
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

Detailed Description

graphs representing rain basins on the mesh Generated from class MR::WatershedGraph.

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ WatershedGraph() [1/3]

meshlib.WatershedGraph.WatershedGraph ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ WatershedGraph() [2/3]

meshlib.WatershedGraph.WatershedGraph ( meshlib.WatershedGraph _other)

Generated from constructor MR::WatershedGraph::WatershedGraph. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

Calls MR_WatershedGraph_ConstructFromAnother().

◆ WatershedGraph() [3/3]

meshlib.WatershedGraph.WatershedGraph ( meshlib.Mesh mesh,
meshlib.Vector_int_MR_FaceId face2basin,
int numBasins )

constructs the graph from given mesh, heights in z-coordinate, and initial subdivision on basins Generated from constructor MR::WatershedGraph::WatershedGraph. The reference to the parameter mesh might be preserved in the constructed object. The reference to the parameter face2basin might be preserved in the constructed object.

Calls MR_WatershedGraph_Construct().

Member Function Documentation

◆ basinInfo()

meshlib.WatershedGraph_BasinInfo meshlib.WatershedGraph.basinInfo ( meshlib.GraphVertId v)

returns data associated with given basin Generated from method MR::WatershedGraph::basinInfo.

Calls MR_WatershedGraph_basinInfo().

◆ basinInfo_mut()

meshlib.WatershedGraph_BasinInfo meshlib.WatershedGraph.basinInfo_mut ( meshlib.GraphVertId v)

Generated from method MR::WatershedGraph::basinInfo.

Calls MR_WatershedGraph_basinInfo_mut().

◆ bdInfo()

meshlib.WatershedGraph_BdInfo meshlib.WatershedGraph.bdInfo ( meshlib.GraphEdgeId e)

returns data associated with given boundary between basins Generated from method MR::WatershedGraph::bdInfo.

Calls MR_WatershedGraph_bdInfo().

◆ bdInfo_mut()

meshlib.WatershedGraph_BdInfo meshlib.WatershedGraph.bdInfo_mut ( meshlib.GraphEdgeId e)

Generated from method MR::WatershedGraph::bdInfo.

Calls MR_WatershedGraph_bdInfo_mut().

◆ computeBasinVolume()

double meshlib.WatershedGraph.computeBasinVolume ( meshlib.GraphVertId 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 Generated from method MR::WatershedGraph::computeBasinVolume.

Calls MR_WatershedGraph_computeBasinVolume().

◆ findLowestBd()

meshlib.std_pair_MR_GraphEdgeId_float meshlib.WatershedGraph.findLowestBd ( )

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 Generated from method MR::WatershedGraph::findLowestBd.

Calls MR_WatershedGraph_findLowestBd().

◆ flowsFinallyTo()

meshlib.GraphVertId meshlib.WatershedGraph.flowsFinallyTo ( meshlib.GraphVertId v,
java.lang.Boolean exceptOutside )

returns the basin where the flow from this basin finally goes (it can be self id if the basin is not full yet);

Parameters
exceptOutsideif true then the method returns the basin that receives water flow from (v) just before outside Generated from method MR::WatershedGraph::flowsFinallyTo.

Calls MR_WatershedGraph_flowsFinallyTo().

◆ flowsTo()

meshlib.GraphVertId meshlib.WatershedGraph.flowsTo ( meshlib.GraphVertId v)

returns the basin where the flow from this basin goes next (it can be self id if the basin is not full yet) Generated from method MR::WatershedGraph::flowsTo.

Calls MR_WatershedGraph_flowsTo().

◆ getAllBasinFaces()

meshlib.Vector_MR_FaceBitSet_MR_GraphVertId meshlib.WatershedGraph.getAllBasinFaces ( java.lang.Boolean joinOverflowBasins)

returns the mesh faces of each valid basin;

Parameters
joinOverflowBasinsif true then overflowing basins will be merged in the target basins (except for overflow in outside) Generated from method MR::WatershedGraph::getAllBasinFaces.

Calls MR_WatershedGraph_getAllBasinFaces().

◆ getBasinFaces()

meshlib.FaceBitSet meshlib.WatershedGraph.getBasinFaces ( meshlib.GraphVertId basin)

returns the mesh faces of given basin Generated from method MR::WatershedGraph::getBasinFaces.

Calls MR_WatershedGraph_getBasinFaces().

◆ getBasinFacesBelowLevel()

meshlib.FaceBitSet meshlib.WatershedGraph.getBasinFacesBelowLevel ( meshlib.GraphVertId basin,
float waterLevel )

returns the mesh faces of given basin with at least one vertex below given level Generated from method MR::WatershedGraph::getBasinFacesBelowLevel.

Calls MR_WatershedGraph_getBasinFacesBelowLevel().

◆ getHeightAt()

float meshlib.WatershedGraph.getHeightAt ( meshlib.VertId v)

returns height at given vertex or FLT_MAX if the vertex is invalid Generated from method MR::WatershedGraph::getHeightAt.

Calls MR_WatershedGraph_getHeightAt().

◆ getInterBasinEdges()

meshlib.UndirectedEdgeBitSet meshlib.WatershedGraph.getInterBasinEdges ( java.lang.Boolean joinOverflowBasins)

returns the mesh edges between current basins

Parameters
joinOverflowBasinsif true then overflowing basins will be merged in the target basins (except for overflow in outside) Generated from method MR::WatershedGraph::getInterBasinEdges.

Calls MR_WatershedGraph_getInterBasinEdges().

◆ getOverflowPoints()

meshlib.std_vector_MR_WatershedGraph_OverflowPoint meshlib.WatershedGraph.getOverflowPoints ( )

returns all overflow points in the graph Generated from method MR::WatershedGraph::getOverflowPoints.

Calls MR_WatershedGraph_getOverflowPoints().

◆ getRootBasin()

meshlib.GraphVertId meshlib.WatershedGraph.getRootBasin ( meshlib.GraphVertId v)

for valid basin returns self id; for invalid basin returns the id of basin it was merged in Generated from method MR::WatershedGraph::getRootBasin.

Calls MR_WatershedGraph_getRootBasin().

◆ graph()

meshlib.Graph meshlib.WatershedGraph.graph ( )

returns underlying graph where each basin is a vertex Generated from method MR::WatershedGraph::graph.

Calls MR_WatershedGraph_graph().

◆ iniBasin2Tgt()

meshlib.Vector_MR_GraphVertId_MR_GraphVertId meshlib.WatershedGraph.iniBasin2Tgt ( java.lang.Boolean joinOverflowBasins)

computes a map from initial basin id to a valid basin in which it was merged

Parameters
joinOverflowBasinsif true then overflowing basins will be merged in the target basins (except for overflow in outside) Generated from method MR::WatershedGraph::iniBasin2Tgt.

Calls MR_WatershedGraph_iniBasin2Tgt().

◆ merge()

meshlib.GraphVertId meshlib.WatershedGraph.merge ( meshlib.GraphVertId v0,
meshlib.GraphVertId v1 )

merges basin v1 into basin v0, v1 is deleted after that, returns v0 Generated from method MR::WatershedGraph::merge.

Calls MR_WatershedGraph_merge().

◆ mergeViaBd()

meshlib.GraphVertId meshlib.WatershedGraph.mergeViaBd ( meshlib.GraphEdgeId bd)

merges two basins sharing given boundary, returns remaining basin Generated from method MR::WatershedGraph::mergeViaBd.

Calls MR_WatershedGraph_mergeViaBd().

◆ numBasins()

int meshlib.WatershedGraph.numBasins ( )

returns the current number of basins (excluding special "outside" basin) Generated from method MR::WatershedGraph::numBasins.

Calls MR_WatershedGraph_numBasins().

◆ outsideId()

meshlib.GraphVertId meshlib.WatershedGraph.outsideId ( )

returns special "basin" representing outside areas of the mesh Generated from method MR::WatershedGraph::outsideId.

Calls MR_WatershedGraph_outsideId().

◆ setParentsToRoots()

void meshlib.WatershedGraph.setParentsToRoots ( )

replaces parent of each basin with its computed root; this speeds up following calls to getRootBasin() Generated from method MR::WatershedGraph::setParentsToRoots.

Calls MR_WatershedGraph_setParentsToRoots().

◆ totalArea()

float meshlib.WatershedGraph.totalArea ( )

returns total precipitation area Generated from method MR::WatershedGraph::totalArea.

Calls MR_WatershedGraph_totalArea().


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