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
28
31
35
38
44
50
56
62
67
73
77
82
87
90
93
98
101
104
110
116
121
127
133
138
144
150
155
161
165
170
174
177
180
185
188
191
197
201
204
207
214
217
220
231
232// same with all amounts equal to 1
240
241// general version that supplies starts in a functional way
251
260
261// same with all amounts equal to 1
267
268// general version that supplies starts in a functional way
275
282
287
291
296
301
305
310
314
319
323
326
329
333
336
339
344
345#ifdef __cplusplus
346} // extern "C"
347#endif
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:29
struct MR_Polyline3 MR_Polyline3
Definition MRAABBTreePolyline.h:16
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
Generated from class MR::FlowOrigin.
Definition MRAggregateFlow.h:27
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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:34
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_FlowAggregator_Flows MR_FlowAggregator_Flows
Generated from class MR::FlowAggregator::Flows.
Definition MRAggregateFlow.h:37
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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
Generated from class MR::OutputFlows.
Definition MRAggregateFlow.h:30
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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:13
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11