this class can track multiple flows and find in each mesh vertex the amount of water reached it More...
#include <MRAggregateFlow.h>
Classes | |
struct | Flows |
Public Member Functions | |
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 |
MRMESH_API VertScalars | computeFlow (const std::vector< MeshTriPoint > &starts, const OutputFlows &out={}) 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 (const std::vector< MeshTriPoint > &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 UndirectedEdgeBitSet | computeCatchmentDelineation () const |
this class can track multiple flows and find in each mesh vertex the amount of water reached it
MRMESH_API MR::FlowAggregator::FlowAggregator | ( | const Mesh & | mesh, |
const VertScalars & | heights ) |
prepares the processing of given mesh with given height in each vertex
|
nodiscard |
finds the edges on the mesh that divides catchment basin (every triangle is attributed to the final destination point based on the path originated from its centroid)
MRMESH_API VertScalars MR::FlowAggregator::computeFlow | ( | const std::vector< FlowOrigin > & | starts, |
const OutputFlows & | out = {} ) const |
tracks multiple flows
starts | the origin of each flow (should be uniformly sampled over the terrain) |
MRMESH_API VertScalars MR::FlowAggregator::computeFlow | ( | const std::vector< MeshTriPoint > & | starts, |
const OutputFlows & | out = {} ) const |
MRMESH_API VertScalars MR::FlowAggregator::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)> & | regionById, | ||
const OutputFlows & | out = {} ) const |
startById | can return invalid point that will be ignored |
regionById | if given then the flow initially is limited to this region |
MRMESH_API HashMap< VertId, Flows > MR::FlowAggregator::computeFlowsPerBasin | ( | const std::vector< FlowOrigin > & | starts | ) | const |
tracks multiple flows
starts | the origin of each flow (should be uniformly sampled over the terrain) |
MRMESH_API HashMap< VertId, Flows > MR::FlowAggregator::computeFlowsPerBasin | ( | const std::vector< MeshTriPoint > & | starts | ) | const |
MRMESH_API HashMap< VertId, Flows > MR::FlowAggregator::computeFlowsPerBasin | ( | size_t | numStarts, |
const std::function< MeshTriPoint(size_t)> & | startById, | ||
const std::function< float(size_t)> & | amountById ) const |
startById | can return invalid point that will be ignored |