MeshLib C Docs
Loading...
Searching...
No Matches
MRAggregateFlow.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
5
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
13typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
14typedef struct MR_Polyline3 MR_Polyline3; // Defined in `#include <MRCMesh/MRPolyline.h>`.
15typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16typedef struct MR_UndirectedEdgeScalars MR_UndirectedEdgeScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
17typedef struct MR_VertScalars MR_VertScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
18typedef struct MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows; // Defined in `#include <MRCMisc/phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows.h>`.
19typedef struct MR_std_function_MR_MeshTriPoint_from_uint64_t MR_std_function_MR_MeshTriPoint_from_uint64_t; // Defined in `#include <MRCMisc/std_function_MR_MeshTriPoint_from_uint64_t.h>`.
20typedef struct MR_std_function_const_MR_FaceBitSet_ptr_from_uint64_t MR_std_function_const_MR_FaceBitSet_ptr_from_uint64_t; // Defined in `#include <MRCMisc/std_function_const_MR_FaceBitSet_ptr_from_uint64_t.h>`.
21typedef struct MR_std_function_float_from_uint64_t MR_std_function_float_from_uint64_t; // Defined in `#include <MRCMisc/std_function_float_from_uint64_t.h>`.
22typedef struct MR_std_vector_MR_FlowOrigin MR_std_vector_MR_FlowOrigin; // Defined in `#include <MRCMisc/std_vector_MR_FlowOrigin.h>`.
23typedef struct MR_std_vector_MR_MeshTriPoint MR_std_vector_MR_MeshTriPoint; // Defined in `#include <MRCMisc/std_vector_MR_MeshTriPoint.h>`.
24
25
29
33
37
42
48
56
62
68
74
80
84
89
96
100
104
110
113
116
124
130
137
143
149
156
162
168
174
180
184
189
196
200
204
210
213
216
224
229
233
237
246
249
252
263
264// same with all amounts equal to 1
272
273// general version that supplies starts in a functional way
283
292
293// same with all amounts equal to 1
299
300// general version that supplies starts in a functional way
307
314
319
325
330
335
341
346
350
355
362
366
370
375
378
381
388
389#ifdef __cplusplus
390} // extern "C"
391#endif
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:28
struct MR_Polyline3 MR_Polyline3
Definition MRAABBTreePolyline.h:21
struct MR_std_vector_MR_MeshTriPoint MR_std_vector_MR_MeshTriPoint
Definition MRAggregateFlow.h:23
MRC_API MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows * MR_FlowAggregator_computeFlowsPerBasin_1_std_vector_MR_FlowOrigin(const MR_FlowAggregator *_this, const MR_std_vector_MR_FlowOrigin *starts)
MRC_API MR_MeshTriPoint * MR_FlowOrigin_GetMutable_point(MR_FlowOrigin *_this)
MRC_API void MR_FlowOrigin_Destroy(const MR_FlowOrigin *_this)
Destroys a heap-allocated instance of MR_FlowOrigin. Does nothing if the pointer is null.
MRC_API MR_OutputFlows * MR_OutputFlows_ConstructFrom(MR_Polyline3 *pPolyline, MR_UndirectedEdgeScalars *pFlowPerEdge, float amountGreaterThan)
struct MR_FlowOrigin MR_FlowOrigin
Definition MRAggregateFlow.h:28
struct MR_std_function_MR_MeshTriPoint_from_uint64_t MR_std_function_MR_MeshTriPoint_from_uint64_t
Definition MRAggregateFlow.h:19
MRC_API void MR_OutputFlows_Set_pPolyline(MR_OutputFlows *_this, MR_Polyline3 *value)
struct MR_std_function_float_from_uint64_t MR_std_function_float_from_uint64_t
Definition MRAggregateFlow.h:21
MRC_API MR_FlowAggregator * MR_FlowAggregator_ConstructFromAnother(MR_PassBy _other_pass_by, MR_FlowAggregator *_other)
MRC_API MR_OutputFlows * MR_OutputFlows_ConstructFromAnother(const MR_OutputFlows *_other)
MRC_API float * MR_OutputFlows_GetMutable_amountGreaterThan(MR_OutputFlows *_this)
MRC_API void MR_FlowAggregator_DestroyArray(const MR_FlowAggregator *_this)
Destroys a heap-allocated array of MR_FlowAggregator. Does nothing if the pointer is null.
MRC_API const MR_FlowAggregator * MR_FlowAggregator_OffsetPtr(const MR_FlowAggregator *ptr, ptrdiff_t i)
struct MR_std_vector_MR_FlowOrigin MR_std_vector_MR_FlowOrigin
Definition MRAggregateFlow.h:22
MRC_API void MR_OutputFlows_Set_pFlowPerEdge(MR_OutputFlows *_this, MR_UndirectedEdgeScalars *value)
MRC_API void MR_FlowAggregator_Flows_Set_flowPerEdge(MR_FlowAggregator_Flows *_this, MR_PassBy value_pass_by, MR_UndirectedEdgeScalars *value)
MRC_API MR_FlowOrigin * MR_FlowOrigin_ConstructFromAnother(const MR_FlowOrigin *_other)
MRC_API const MR_FlowOrigin * MR_FlowOrigin_OffsetPtr(const MR_FlowOrigin *ptr, ptrdiff_t i)
MRC_API const float * MR_OutputFlows_Get_amountGreaterThan(const MR_OutputFlows *_this)
struct MR_std_function_const_MR_FaceBitSet_ptr_from_uint64_t MR_std_function_const_MR_FaceBitSet_ptr_from_uint64_t
Definition MRAggregateFlow.h:20
MRC_API MR_VertScalars * MR_FlowAggregator_computeFlow_2_std_vector_MR_MeshTriPoint(const MR_FlowAggregator *_this, const MR_std_vector_MR_MeshTriPoint *starts, const MR_OutputFlows *out)
MRC_API MR_Polyline3 * MR_FlowAggregator_Flows_GetMutable_polyline(MR_FlowAggregator_Flows *_this)
struct MR_VertScalars MR_VertScalars
Definition MRAggregateFlow.h:17
MRC_API MR_FlowOrigin * MR_FlowOrigin_AssignFromAnother(MR_FlowOrigin *_this, const MR_FlowOrigin *_other)
struct MR_FlowAggregator MR_FlowAggregator
Definition MRAggregateFlow.h:41
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
MRC_API MR_FlowAggregator * MR_FlowAggregator_Construct(const MR_Mesh *mesh, const MR_VertScalars *heights)
MRC_API void MR_FlowAggregator_Flows_Set_polyline(MR_FlowAggregator_Flows *_this, MR_PassBy value_pass_by, MR_Polyline3 *value)
MRC_API const MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_OffsetPtr(const MR_FlowAggregator_Flows *ptr, ptrdiff_t i)
MRC_API void MR_FlowOrigin_DestroyArray(const MR_FlowOrigin *_this)
Destroys a heap-allocated array of MR_FlowOrigin. Does nothing if the pointer is null.
MRC_API void MR_FlowAggregator_Flows_Destroy(const MR_FlowAggregator_Flows *_this)
Destroys a heap-allocated instance of MR_FlowAggregator_Flows. Does nothing if the pointer is null.
MRC_API MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_DefaultConstruct(void)
MRC_API const MR_OutputFlows * MR_OutputFlows_OffsetPtr(const MR_OutputFlows *ptr, ptrdiff_t i)
struct MR_FlowAggregator_Flows MR_FlowAggregator_Flows
Definition MRAggregateFlow.h:36
MRC_API void MR_FlowAggregator_Flows_DestroyArray(const MR_FlowAggregator_Flows *_this)
Destroys a heap-allocated array of MR_FlowAggregator_Flows. Does nothing if the pointer is null.
MRC_API MR_FlowOrigin * MR_FlowOrigin_OffsetMutablePtr(MR_FlowOrigin *ptr, ptrdiff_t i)
MRC_API MR_UndirectedEdgeScalars * MR_FlowAggregator_Flows_GetMutable_flowPerEdge(MR_FlowAggregator_Flows *_this)
MRC_API MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows * MR_FlowAggregator_computeFlowsPerBasin_1_std_vector_MR_MeshTriPoint(const MR_FlowAggregator *_this, const MR_std_vector_MR_MeshTriPoint *starts)
MRC_API MR_VertScalars * MR_FlowAggregator_computeFlow_2_std_vector_MR_FlowOrigin(const MR_FlowAggregator *_this, const MR_std_vector_MR_FlowOrigin *starts, const MR_OutputFlows *out)
MRC_API MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_AssignFromAnother(MR_FlowAggregator_Flows *_this, MR_PassBy _other_pass_by, MR_FlowAggregator_Flows *_other)
MRC_API MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_OffsetMutablePtr(MR_FlowAggregator_Flows *ptr, ptrdiff_t i)
MRC_API MR_OutputFlows * MR_OutputFlows_DefaultConstructArray(size_t num_elems)
MRC_API MR_FlowOrigin * MR_FlowOrigin_ConstructFrom(const MR_MeshTriPoint *point, float amount)
MRC_API MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows * MR_FlowAggregator_computeFlowsPerBasin_3(const MR_FlowAggregator *_this, MR_uint64_t numStarts, const MR_std_function_MR_MeshTriPoint_from_uint64_t *startById, const MR_std_function_float_from_uint64_t *amountById)
MRC_API const MR_MeshTriPoint * MR_FlowOrigin_Get_point(const MR_FlowOrigin *_this)
MRC_API void MR_OutputFlows_Set_amountGreaterThan(MR_OutputFlows *_this, float value)
MRC_API MR_FlowAggregator * MR_FlowAggregator_OffsetMutablePtr(MR_FlowAggregator *ptr, ptrdiff_t i)
MRC_API void MR_FlowOrigin_Set_point(MR_FlowOrigin *_this, const MR_MeshTriPoint *value)
MRC_API MR_Polyline3 *const * MR_OutputFlows_Get_pPolyline(const MR_OutputFlows *_this)
MRC_API MR_VertScalars * MR_FlowAggregator_computeFlow_5(const MR_FlowAggregator *_this, MR_uint64_t numStarts, const MR_std_function_MR_MeshTriPoint_from_uint64_t *startById, const MR_std_function_float_from_uint64_t *amountById, const MR_std_function_const_MR_FaceBitSet_ptr_from_uint64_t *regionById, const MR_OutputFlows *out)
MRC_API const MR_Polyline3 * MR_FlowAggregator_Flows_Get_polyline(const MR_FlowAggregator_Flows *_this)
MRC_API MR_UndirectedEdgeScalars *const * MR_OutputFlows_Get_pFlowPerEdge(const MR_OutputFlows *_this)
struct MR_OutputFlows MR_OutputFlows
Definition MRAggregateFlow.h:32
MRC_API MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_DefaultConstructArray(size_t num_elems)
MRC_API float * MR_FlowOrigin_GetMutable_amount(MR_FlowOrigin *_this)
MRC_API void MR_OutputFlows_Destroy(const MR_OutputFlows *_this)
Destroys a heap-allocated instance of MR_OutputFlows. Does nothing if the pointer is null.
MRC_API MR_OutputFlows * MR_OutputFlows_AssignFromAnother(MR_OutputFlows *_this, const MR_OutputFlows *_other)
MRC_API const float * MR_FlowOrigin_Get_amount(const MR_FlowOrigin *_this)
MRC_API MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_ConstructFrom(MR_PassBy polyline_pass_by, MR_Polyline3 *polyline, MR_PassBy flowPerEdge_pass_by, MR_UndirectedEdgeScalars *flowPerEdge)
struct MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows MR_phmap_flat_hash_map_MR_VertId_MR_FlowAggregator_Flows
Definition MRAggregateFlow.h:18
MRC_API MR_OutputFlows * MR_OutputFlows_DefaultConstruct(void)
MRC_API MR_FlowAggregator_Flows * MR_FlowAggregator_Flows_ConstructFromAnother(MR_PassBy _other_pass_by, MR_FlowAggregator_Flows *_other)
MRC_API void MR_FlowOrigin_Set_amount(MR_FlowOrigin *_this, float value)
MRC_API void MR_OutputFlows_DestroyArray(const MR_OutputFlows *_this)
Destroys a heap-allocated array of MR_OutputFlows. Does nothing if the pointer is null.
MRC_API const MR_UndirectedEdgeScalars * MR_FlowAggregator_Flows_Get_flowPerEdge(const MR_FlowAggregator_Flows *_this)
MRC_API MR_OutputFlows * MR_OutputFlows_OffsetMutablePtr(MR_OutputFlows *ptr, ptrdiff_t i)
MRC_API MR_UndirectedEdgeBitSet * MR_FlowAggregator_computeCatchmentDelineation(const MR_FlowAggregator *_this)
MRC_API MR_Polyline3 ** MR_OutputFlows_GetMutable_pPolyline(MR_OutputFlows *_this)
struct MR_UndirectedEdgeScalars MR_UndirectedEdgeScalars
Definition MRAggregateFlow.h:16
MRC_API MR_FlowOrigin * MR_FlowOrigin_DefaultConstruct(void)
MRC_API void MR_FlowAggregator_Destroy(const MR_FlowAggregator *_this)
Destroys a heap-allocated instance of MR_FlowAggregator. Does nothing if the pointer is null.
MRC_API MR_UndirectedEdgeScalars ** MR_OutputFlows_GetMutable_pFlowPerEdge(MR_OutputFlows *_this)
MRC_API MR_FlowOrigin * MR_FlowOrigin_DefaultConstructArray(size_t num_elems)
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MR_PassBy
Definition common.h:23
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition exports.h:11