MeshLib C Docs
Loading...
Searching...
No Matches
MREdgePaths.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMesh/MRVector3.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct MR_EdgeBitSet MR_EdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
17typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
18typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
19typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
20typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
21typedef struct MR_Plane3f MR_Plane3f; // Defined in `#include <MRCMesh/MRPlane3.h>`.
22typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
23typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
24typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
25typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
26typedef struct MR_std_function_float_from_MR_EdgeId MR_std_function_float_from_MR_EdgeId; // Defined in `#include <MRCMisc/std_function_float_from_MR_EdgeId.h>`.
27typedef struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId; // Defined in `#include <MRCMisc/std_vector_MR_EdgeId.h>`.
28typedef struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint; // Defined in `#include <MRCMisc/std_vector_MR_EdgePoint.h>`.
29typedef struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f; // Defined in `#include <MRCMisc/std_vector_MR_Vector3f.h>`.
30typedef struct MR_std_vector_MR_VertId MR_std_vector_MR_VertId; // Defined in `#include <MRCMisc/std_vector_MR_VertId.h>`.
31typedef struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_EdgeId.h>`.
32
33
38
44
50
59
65
70
75
80
87
92
97
104
109
113
118
123
127
132
136
141
145
148
151
156
159
162
168
175MRC_API MR_std_vector_MR_EdgeId *MR_buildShortestPath_MR_VertId(const MR_Mesh *mesh, MR_VertId start, MR_VertId finish, const float *maxPathLen);
176
184MRC_API MR_std_vector_MR_EdgeId *MR_buildShortestPathBiDir_4(const MR_Mesh *mesh, MR_VertId start, MR_VertId finish, const float *maxPathLen);
185
198MRC_API MR_std_vector_MR_EdgeId *MR_buildShortestPathBiDir_6(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_MeshTriPoint *finish, MR_VertId *outPathStart, MR_VertId *outPathFinish, const float *maxPathLen);
199
207MRC_API MR_std_vector_MR_EdgeId *MR_buildShortestPathAStar_4(const MR_Mesh *mesh, MR_VertId start, MR_VertId finish, const float *maxPathLen);
208
221MRC_API MR_std_vector_MR_EdgeId *MR_buildShortestPathAStar_6(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_MeshTriPoint *finish, MR_VertId *outPathStart, MR_VertId *outPathFinish, const float *maxPathLen);
222
229MRC_API MR_std_vector_MR_EdgeId *MR_buildShortestPath_MR_VertBitSet(const MR_Mesh *mesh, MR_VertId start, const MR_VertBitSet *finish, const float *maxPathLen);
230
238
248
259MRC_API MR_std_vector_MR_EdgeId *MR_buildSmallestMetricPathBiDir_9(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, const MR_TerminalVertex *starts, int32_t numStarts, const MR_TerminalVertex *finishes, int32_t numFinishes, MR_VertId *outPathStart, MR_VertId *outPathFinish, const float *maxPathMetric);
260
269
275
282
289
295
303
310
317
325
332
339
345MRC_API bool MR_dilateRegion_4_MR_FaceBitSet(const MR_Mesh *mesh, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
346
351MRC_API bool MR_dilateRegion_4_MR_VertBitSet(const MR_Mesh *mesh, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
352
358
365
372
379
385MRC_API bool MR_erodeRegion_4_MR_FaceBitSet(const MR_Mesh *mesh, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
386
391MRC_API bool MR_erodeRegion_4_MR_VertBitSet(const MR_Mesh *mesh, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
392
398
405
412
419
426MRC_API int32_t MR_getPathPlaneIntersections(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *path, const MR_Plane3f *plane, MR_std_vector_MR_EdgePoint *outIntersections);
427
434
442MRC_API int32_t MR_getPathEdgesInPlane(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *path, const MR_Plane3f *plane, const float *tolerance, MR_std_vector_MR_EdgeId *outInPlaneEdges);
443
444#ifdef __cplusplus
445} // extern "C"
446#endif
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:19
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:16
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTreeBase.h:25
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:29
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:22
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
struct MR_Plane3f MR_Plane3f
Definition MRBestFit.h:23
struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f
Definition MRBestFit.h:26
struct MR_EdgeBitSet MR_EdgeBitSet
Definition MRBitSet.h:79
struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId
Definition MRContoursStitch.h:11
struct MR_Mesh MR_Mesh
Definition MRCtm.h:13
struct MR_std_function_float_from_MR_EdgeId MR_std_function_float_from_MR_EdgeId
Definition MREdgeMetric.h:12
MRC_API bool MR_erodeRegion_4_MR_UndirectedEdgeBitSet(const MR_Mesh *mesh, MR_UndirectedEdgeBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_std_vector_MR_EdgeId * MR_extractLongestClosedLoop(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *inEdges)
MRC_API MR_TerminalVertex * MR_TerminalVertex_ConstructFromAnother(const MR_TerminalVertex *_other)
MRC_API MR_std_vector_MR_EdgeId * MR_buildShortestPathBiDir_6(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_MeshTriPoint *finish, MR_VertId *outPathStart, MR_VertId *outPathFinish, const float *maxPathLen)
MRC_API bool MR_dilateRegionByMetric_MR_VertBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API int32_t MR_getContourPlaneIntersections(const MR_std_vector_MR_Vector3f *path, const MR_Plane3f *plane, MR_std_vector_MR_Vector3f *outIntersections)
MRC_API void MR_TerminalVertex_Destroy(const MR_TerminalVertex *_this)
Destroys a heap-allocated instance of MR_TerminalVertex. Does nothing if the pointer is null.
MRC_API bool MR_dilateRegion_5_const_MR_MeshTopology_ref_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API void MR_sortPathsByLength(MR_std_vector_std_vector_MR_EdgeId *paths, const MR_Mesh *mesh)
MRC_API void MR_TerminalVertex_Set_v(MR_TerminalVertex *_this, MR_VertId value)
MRC_API bool MR_isEdgePath(const MR_MeshTopology *topology, const MR_std_vector_MR_EdgeId *edges)
MRC_API bool MR_erodeRegion_4_MR_FaceBitSet(const MR_Mesh *mesh, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API const float * MR_TerminalVertex_Get_metric(const MR_TerminalVertex *_this)
MRC_API bool MR_erodeRegion_4_MR_VertBitSet(const MR_Mesh *mesh, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_TerminalVertex * MR_TerminalVertex_DefaultConstruct(void)
MRC_API bool MR_erodeRegionByMetric_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_std_vector_MR_EdgeId * MR_buildShortestPathAStar_6(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_MeshTriPoint *finish, MR_VertId *outPathStart, MR_VertId *outPathFinish, const float *maxPathLen)
MRC_API MR_std_vector_std_vector_MR_EdgeId * MR_extractClosedLoops_2(const MR_MeshTopology *topology, MR_EdgeBitSet *edges)
MRC_API MR_std_vector_std_vector_MR_EdgeId * MR_extractClosedLoops_3(const MR_MeshTopology *topology, const MR_std_vector_MR_EdgeId *inEdges, MR_EdgeBitSet *outNotLoopEdges)
MRC_API bool MR_dilateRegion_4_MR_VertBitSet(const MR_Mesh *mesh, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_std_vector_MR_EdgeId * MR_buildShortestPath_MR_VertId(const MR_Mesh *mesh, MR_VertId start, MR_VertId finish, const float *maxPathLen)
MRC_API MR_std_vector_MR_VertId * MR_getVertexOrdering_MR_MeshTopology(const MR_MeshTopology *topology, MR_PassBy region_pass_by, MR_VertBitSet *region)
MRC_API bool MR_erodeRegion_5_const_MR_MeshTopology_ref_MR_UndirectedEdgeBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API bool MR_dilateRegionByMetric_MR_UndirectedEdgeBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_UndirectedEdgeBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API void MR_TerminalVertex_Set_metric(MR_TerminalVertex *_this, float value)
MRC_API bool MR_erodeRegionByMetric_MR_VertBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_TerminalVertex * MR_TerminalVertex_AssignFromAnother(MR_TerminalVertex *_this, const MR_TerminalVertex *_other)
MRC_API MR_Vector3d MR_calcOrientedArea(const MR_std_vector_MR_EdgeId *loop, const MR_Mesh *mesh)
MRC_API int32_t MR_getPathEdgesInPlane(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *path, const MR_Plane3f *plane, const float *tolerance, MR_std_vector_MR_EdgeId *outInPlaneEdges)
MRC_API bool MR_dilateRegion_4_MR_UndirectedEdgeBitSet(const MR_Mesh *mesh, MR_UndirectedEdgeBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_std_vector_MR_EdgeId * MR_buildShortestPathAStar_4(const MR_Mesh *mesh, MR_VertId start, MR_VertId finish, const float *maxPathLen)
MRC_API MR_std_vector_std_vector_MR_EdgeId * MR_splitOnSimpleLoops(const MR_MeshTopology *topology, MR_std_vector_std_vector_MR_EdgeId *loops)
struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint
Definition MREdgePaths.h:28
struct MR_std_vector_MR_VertId MR_std_vector_MR_VertId
Definition MREdgePaths.h:30
MRC_API MR_std_vector_MR_EdgeId * MR_buildSmallestMetricPathBiDir_5(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_VertId start, MR_VertId finish, const float *maxPathMetric)
MRC_API double MR_calcPathLength(const MR_std_vector_MR_EdgeId *path, const MR_Mesh *mesh)
MRC_API void MR_TerminalVertex_DestroyArray(const MR_TerminalVertex *_this)
Destroys a heap-allocated array of MR_TerminalVertex. Does nothing if the pointer is null.
struct MR_TerminalVertex MR_TerminalVertex
Definition MREdgePaths.h:37
MRC_API MR_std_vector_MR_EdgeId * MR_buildSmallestMetricPath_const_MR_MeshTopology_ref_MR_VertId(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_VertId start, MR_VertId finish, const float *maxPathMetric)
MRC_API bool MR_dilateRegion_4_MR_FaceBitSet(const MR_Mesh *mesh, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API const MR_TerminalVertex * MR_TerminalVertex_OffsetPtr(const MR_TerminalVertex *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_VertId * MR_TerminalVertex_GetMutable_v(MR_TerminalVertex *_this)
MRC_API bool MR_dilateRegion_5_const_MR_MeshTopology_ref_MR_UndirectedEdgeBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API bool MR_dilateRegion_5_const_MR_MeshTopology_ref_MR_VertBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API double MR_calcPathMetric(const MR_std_vector_MR_EdgeId *path, MR_PassBy metric_pass_by, MR_std_function_float_from_MR_EdgeId *metric)
MRC_API MR_TerminalVertex * MR_TerminalVertex_DefaultConstructArray(size_t num_elems)
MRC_API MR_TerminalVertex * MR_TerminalVertex_ConstructFrom(MR_VertId v, float metric)
MRC_API int32_t MR_getPathPlaneIntersections(const MR_Mesh *mesh, const MR_std_vector_MR_EdgeId *path, const MR_Plane3f *plane, MR_std_vector_MR_EdgePoint *outIntersections)
MRC_API float * MR_TerminalVertex_GetMutable_metric(MR_TerminalVertex *_this)
MRC_API void MR_sortPathsByMetric(MR_std_vector_std_vector_MR_EdgeId *paths, MR_PassBy metric_pass_by, MR_std_function_float_from_MR_EdgeId *metric)
MRC_API MR_TerminalVertex * MR_TerminalVertex_OffsetMutablePtr(MR_TerminalVertex *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_reverse_std_vector_MR_EdgeId(MR_std_vector_MR_EdgeId *path)
MRC_API MR_std_vector_MR_EdgeId * MR_buildSmallestMetricPath_const_MR_MeshTopology_ref_MR_VertBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_VertId start, const MR_VertBitSet *finish, const float *maxPathMetric)
MRC_API MR_std_vector_MR_EdgeId * MR_buildShortestPathBiDir_4(const MR_Mesh *mesh, MR_VertId start, MR_VertId finish, const float *maxPathLen)
MRC_API bool MR_erodeRegion_5_const_MR_MeshTopology_ref_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API void MR_reverse_std_vector_std_vector_MR_EdgeId(MR_std_vector_std_vector_MR_EdgeId *paths)
MRC_API const MR_VertId * MR_TerminalVertex_Get_v(const MR_TerminalVertex *_this)
MRC_API MR_std_vector_MR_EdgeId * MR_buildShortestPath_MR_VertBitSet(const MR_Mesh *mesh, MR_VertId start, const MR_VertBitSet *finish, const float *maxPathLen)
MRC_API bool MR_erodeRegionByMetric_MR_UndirectedEdgeBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_UndirectedEdgeBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API MR_std_vector_MR_EdgeId * MR_buildSmallestMetricPathBiDir_9(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, const MR_TerminalVertex *starts, int32_t numStarts, const MR_TerminalVertex *finishes, int32_t numFinishes, MR_VertId *outPathStart, MR_VertId *outPathFinish, const float *maxPathMetric)
MRC_API bool MR_isEdgeLoop(const MR_MeshTopology *topology, const MR_std_vector_MR_EdgeId *edges)
MRC_API void MR_addLeftBand(const MR_MeshTopology *topology, const MR_std_vector_MR_EdgeId *loop, MR_FaceBitSet *addHere)
MRC_API bool MR_dilateRegionByMetric_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_std_function_float_from_MR_EdgeId *metric, MR_FaceBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API bool MR_erodeRegion_5_const_MR_MeshTopology_ref_MR_VertBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertBitSet *region, float dilation, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:60
Definition MRId.h:56