45 const std::function<
float(
size_t)> & amountById,
46 const std::function<
const FaceBitSet*(
size_t)> & regionById,
64 const std::function<
float(
size_t)> & amountById )
const;
72 const VertScalars & heights_;
73 VertMap downFlowVert_;
76 std::vector<VertId> vertsSortedDesc_;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
this class can track multiple flows and find in each mesh vertex the amount of water reached it
Definition MRAggregateFlow.h:31
MRMESH_API UndirectedEdgeBitSet computeCatchmentDelineation() const
MRMESH_API VertScalars computeFlow(size_t numStarts, const std::function< MeshTriPoint(size_t)> &startById, const std::function< float(size_t)> &amountById, const std::function< const FaceBitSet *(size_t)> ®ionById, const OutputFlows &out={}) const
MRMESH_API HashMap< VertId, Flows > computeFlowsPerBasin(const std::vector< FlowOrigin > &starts) const
MRMESH_API HashMap< VertId, Flows > computeFlowsPerBasin(size_t numStarts, const std::function< MeshTriPoint(size_t)> &startById, const std::function< float(size_t)> &amountById) const
MRMESH_API VertScalars computeFlow(const std::vector< MeshTriPoint > &starts, const OutputFlows &out={}) const
MRMESH_API HashMap< VertId, Flows > computeFlowsPerBasin(const std::vector< MeshTriPoint > &starts) const
MRMESH_API FlowAggregator(const Mesh &mesh, const VertScalars &heights)
prepares the processing of given mesh with given height in each vertex
MRMESH_API VertScalars computeFlow(const std::vector< FlowOrigin > &starts, const OutputFlows &out={}) const
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:20
Definition MRCameraOrientationPlugin.h:8
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:460
Definition MRAggregateFlow.h:50
UndirectedEdgeScalars flowPerEdge
Definition MRAggregateFlow.h:52
Polyline3 polyline
Definition MRAggregateFlow.h:51
Definition MRAggregateFlow.h:12
MeshTriPoint point
point on the mesh, where this flow starts
Definition MRAggregateFlow.h:14
float amount
amount of flow, e.g. can be proportional to the horizontal area associated with the start point
Definition MRAggregateFlow.h:16
Definition MRMesh/MRMeshTriPoint.h:23
Definition MRMesh/MRMesh.h:23
Definition MRAggregateFlow.h:20
float amountGreaterThan
output in outPolyline only the flows with the amount greater than
Definition MRAggregateFlow.h:26
UndirectedEdgeScalars * pFlowPerEdge
optional output: flow in each line of outPolyline
Definition MRAggregateFlow.h:24
Polyline3 * pPolyline
optional output: lines of all flows
Definition MRAggregateFlow.h:22