MeshLib C Docs
Loading...
Searching...
No Matches
MRSurfacePath.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MREnums.h>
4#include <MRCMesh/MRId.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_EdgePoint MR_EdgePoint; // Defined in `#include <MRCMesh/MREdgePoint.h>`.
15typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
16typedef struct MR_MeshPart MR_MeshPart; // Defined in `#include <MRCMesh/MRMeshPart.h>`.
17typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
18typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
19typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
20typedef struct MR_VertScalars MR_VertScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
21typedef struct MR_expected_std_vector_MR_EdgePoint_MR_PathError MR_expected_std_vector_MR_EdgePoint_MR_PathError; // Defined in `#include <MRCMisc/expected_std_vector_MR_EdgePoint_MR_PathError.h>`.
22typedef struct MR_phmap_flat_hash_map_MR_VertId_MR_VertId MR_phmap_flat_hash_map_MR_VertId_MR_VertId; // Defined in `#include <MRCMisc/phmap_flat_hash_map_MR_VertId_MR_VertId.h>`.
23typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
24typedef struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint; // Defined in `#include <MRCMisc/std_vector_MR_EdgePoint.h>`.
25typedef struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f; // Defined in `#include <MRCMisc/std_vector_MR_Vector3f.h>`.
26typedef struct MR_std_vector_std_vector_MR_EdgePoint MR_std_vector_std_vector_MR_EdgePoint; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_EdgePoint.h>`.
27typedef struct MR_std_vector_std_vector_MR_Vector3f MR_std_vector_std_vector_MR_Vector3f; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_Vector3f.h>`.
28
29
35typedef struct MR_GeodesicPath MR_GeodesicPath;
36
44
48
50{
51 // where the field not-increases both in left and right triangles
53 // where the field not-decreases both in left and right triangles
56
63
71
78
84
90
96
103
111
118
122
127
137
141
145
150
153
156
163
167
171
183MRC_API MR_expected_std_vector_MR_EdgePoint_MR_PathError *MR_computeSurfacePath(const MR_MeshPart *mp, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, const int *maxGeodesicIters, const MR_VertBitSet *vertRegion, MR_VertScalars *outSurfaceDistances);
184
195
204
215
222
230
237
244
251
258
265
272
279
283
288
297
301
305
311
314
317
325
337
349
356
364
372
379
390
398
403MRC_API float MR_surfacePathLength(const MR_Mesh *mesh, const MR_std_vector_MR_EdgePoint *surfacePath);
404
409MRC_API float MR_geodesicPathLength(const MR_Mesh *mesh, const MR_GeodesicPath *path);
410
417
423
430
431#ifdef __cplusplus
432} // extern "C"
433#endif
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:24
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:22
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:19
struct MR_VertScalars MR_VertScalars
std::vector<T>-like container that requires specific indexing type,
Definition MRAggregateFlow.h:17
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint
Definition MRAlignContoursToMesh.h:23
struct MR_GeodesicPath MR_GeodesicPath
Definition MRAlignContoursToMesh.h:16
struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f
Definition MRBestFit.h:25
struct MR_phmap_flat_hash_map_MR_VertId_MR_VertId MR_phmap_flat_hash_map_MR_VertId_MR_VertId
Definition MRBitSet.h:52
struct MR_std_vector_std_vector_MR_Vector3f MR_std_vector_std_vector_MR_Vector3f
Definition MRContour.h:17
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
struct MR_std_string MR_std_string
Definition MRCtm.h:32
struct MR_EdgePoint MR_EdgePoint
Definition MREdgePoint.h:22
char MR_GeodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MREnums.h:119
struct MR_std_vector_std_vector_MR_EdgePoint MR_std_vector_std_vector_MR_EdgePoint
Definition MRExtractIsolines.h:27
MRC_API MR_GeodesicPath * MR_GeodesicPath_ConstructFromAnother(MR_PassBy _other_pass_by, MR_GeodesicPath *_other)
MRC_API void MR_ComputeSteepestDescentPathSettings_Destroy(const MR_ComputeSteepestDescentPathSettings *_this)
Destroys a heap-allocated instance of MR_ComputeSteepestDescentPathSettings. Does nothing if the poin...
MRC_API MR_std_string * MR_toString_MR_PathError(MR_PathError error)
MRC_API MR_MeshTriPoint * MR_GeodesicPath_GetMutable_start(MR_GeodesicPath *_this)
MRC_API MR_GeodesicPath * MR_GeodesicPath_AssignFromAnother(MR_GeodesicPath *_this, MR_PassBy _other_pass_by, MR_GeodesicPath *_other)
MRC_API const MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_OffsetPtr(const MR_ComputeSteepestDescentPathSettings *ptr, ptrdiff_t i)
MRC_API MR_GeodesicPath * MR_GeodesicPath_ConstructFrom(const MR_MeshTriPoint *start, MR_PassBy mids_pass_by, MR_std_vector_MR_EdgePoint *mids, const MR_MeshTriPoint *end)
MRC_API MR_std_vector_MR_Vector3f * MR_geodesicPathToContour3f(const MR_Mesh *mesh, const MR_GeodesicPath *path)
MRC_API MR_phmap_flat_hash_map_MR_VertId_MR_VertId * MR_computeClosestSurfacePathTargets(const MR_Mesh *mesh, const MR_VertBitSet *starts, const MR_VertBitSet *ends, const MR_VertBitSet *vertRegion, MR_VertScalars *outSurfaceDistances)
MRC_API MR_UndirectedEdgeBitSet * MR_findExtremeEdges(const MR_Mesh *mesh, const MR_VertScalars *field, MR_ExtremeEdgeType type)
MRC_API void MR_GeodesicPath_Set_mids(MR_GeodesicPath *_this, MR_PassBy value_pass_by, MR_std_vector_MR_EdgePoint *value)
MRC_API MR_expected_std_vector_MR_EdgePoint_MR_PathError * MR_computeSurfacePath(const MR_MeshPart *mp, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, const int *maxGeodesicIters, const MR_VertBitSet *vertRegion, MR_VertScalars *outSurfaceDistances)
MRC_API void MR_ComputeSteepestDescentPathSettings_DestroyArray(const MR_ComputeSteepestDescentPathSettings *_this)
Destroys a heap-allocated array of MR_ComputeSteepestDescentPathSettings. Does nothing if the pointer...
MRC_API MR_expected_std_vector_MR_EdgePoint_MR_PathError * MR_computeGeodesicPath(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, const MR_GeodesicPathApprox *atype, const int *maxGeodesicIters)
MRC_API void MR_GeodesicPath_Destroy(const MR_GeodesicPath *_this)
Destroys a heap-allocated instance of MR_GeodesicPath. Does nothing if the pointer is null.
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_ConstructFromAnother(const MR_ComputeSteepestDescentPathSettings *_other)
struct MR_ComputeSteepestDescentPathSettings MR_ComputeSteepestDescentPathSettings
Definition MRSurfacePath.h:47
MRC_API void MR_computeSteepestDescentPath_5(const MR_MeshPart *mp, const MR_VertScalars *field, const MR_MeshTriPoint *start, MR_std_vector_MR_EdgePoint *outPath, const MR_ComputeSteepestDescentPathSettings *settings)
MRC_API const MR_MeshTriPoint * MR_GeodesicPath_Get_end(const MR_GeodesicPath *_this)
MR_ExtremeEdgeType
Definition MRSurfacePath.h:50
@ MR_ExtremeEdgeType_Gorge
Definition MRSurfacePath.h:54
@ MR_ExtremeEdgeType_Ridge
Definition MRSurfacePath.h:52
MRC_API MR_VertId ** MR_ComputeSteepestDescentPathSettings_GetMutable_outVertexReached(MR_ComputeSteepestDescentPathSettings *_this)
MRC_API float MR_geodesicPathLength(const MR_Mesh *mesh, const MR_GeodesicPath *path)
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_OffsetMutablePtr(MR_ComputeSteepestDescentPathSettings *ptr, ptrdiff_t i)
MRC_API const MR_MeshTriPoint * MR_GeodesicPath_Get_start(const MR_GeodesicPath *_this)
MRC_API void MR_GeodesicPath_DestroyArray(const MR_GeodesicPath *_this)
Destroys a heap-allocated array of MR_GeodesicPath. Does nothing if the pointer is null.
MRC_API MR_VertId *const * MR_ComputeSteepestDescentPathSettings_Get_outVertexReached(const MR_ComputeSteepestDescentPathSettings *_this)
MRC_API MR_GeodesicPath * MR_GeodesicPath_DefaultConstruct(void)
MRC_API MR_EdgePoint * MR_findSteepestDescentPoint_MR_VertId(const MR_MeshPart *mp, const MR_VertScalars *field, MR_VertId v)
MRC_API MR_MeshTriPoint * MR_ComputeSteepestDescentPathSettings_GetMutable_end(MR_ComputeSteepestDescentPathSettings *_this)
MRC_API MR_uint64_t MR_GeodesicPath_numVertices(const MR_GeodesicPath *_this)
MRC_API MR_std_vector_MR_Vector3f * MR_surfacePathToContour3f(const MR_Mesh *mesh, const MR_std_vector_MR_EdgePoint *line)
MRC_API float MR_surfacePathLength(const MR_Mesh *mesh, const MR_std_vector_MR_EdgePoint *surfacePath)
MRC_API void MR_GeodesicPath_Set_end(MR_GeodesicPath *_this, const MR_MeshTriPoint *value)
MR_PathError
Definition MRSurfacePath.h:38
@ MR_PathError_InternalError
Definition MRSurfacePath.h:42
@ MR_PathError_StartEndNotConnected
no path can be found from start to end, because they are not from the same connected component
Definition MRSurfacePath.h:40
MRC_API void MR_ComputeSteepestDescentPathSettings_Set_outBdReached(MR_ComputeSteepestDescentPathSettings *_this, MR_EdgePoint *value)
MRC_API void MR_ComputeSteepestDescentPathSettings_Set_outVertexReached(MR_ComputeSteepestDescentPathSettings *_this, MR_VertId *value)
MRC_API MR_std_vector_std_vector_MR_EdgePoint * MR_getSurfacePathsViaVertices(const MR_Mesh *mesh, const MR_VertBitSet *vs)
MRC_API MR_expected_std_vector_MR_EdgePoint_MR_PathError * MR_computeGeodesicPathApprox(const MR_Mesh *mesh, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, MR_GeodesicPathApprox atype)
MRC_API MR_expected_std_vector_MR_EdgePoint_MR_PathError * MR_computeFastMarchingPath(const MR_MeshPart *mp, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, const MR_VertBitSet *vertRegion, MR_VertScalars *outSurfaceDistances)
MRC_API void MR_GeodesicPath_Set_start(MR_GeodesicPath *_this, const MR_MeshTriPoint *value)
MRC_API MR_GeodesicPath * MR_GeodesicPath_OffsetMutablePtr(MR_GeodesicPath *ptr, ptrdiff_t i)
MRC_API const MR_GeodesicPath * MR_GeodesicPath_OffsetPtr(const MR_GeodesicPath *ptr, ptrdiff_t i)
MRC_API const MR_std_vector_MR_EdgePoint * MR_GeodesicPath_Get_mids(const MR_GeodesicPath *_this)
MRC_API const MR_MeshTriPoint * MR_ComputeSteepestDescentPathSettings_Get_end(const MR_ComputeSteepestDescentPathSettings *_this)
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_DefaultConstructArray(size_t num_elems)
MRC_API MR_EdgePoint *const * MR_ComputeSteepestDescentPathSettings_Get_outBdReached(const MR_ComputeSteepestDescentPathSettings *_this)
MRC_API MR_std_vector_std_vector_MR_Vector3f * MR_surfacePathsToContours3f(const MR_Mesh *mesh, const MR_std_vector_std_vector_MR_EdgePoint *lines)
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_AssignFromAnother(MR_ComputeSteepestDescentPathSettings *_this, const MR_ComputeSteepestDescentPathSettings *_other)
MRC_API MR_MeshTriPoint * MR_GeodesicPath_GetMutable_end(MR_GeodesicPath *_this)
MRC_API MR_std_vector_MR_EdgePoint * MR_GeodesicPath_GetMutable_mids(MR_GeodesicPath *_this)
MRC_API MR_EdgePoint * MR_findSteepestDescentPoint_MR_MeshTriPoint(const MR_MeshPart *mp, const MR_VertScalars *field, const MR_MeshTriPoint *tp)
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_ConstructFrom(const MR_MeshTriPoint *end, MR_VertId *outVertexReached, MR_EdgePoint *outBdReached)
MRC_API MR_EdgePoint ** MR_ComputeSteepestDescentPathSettings_GetMutable_outBdReached(MR_ComputeSteepestDescentPathSettings *_this)
MRC_API MR_GeodesicPath * MR_GeodesicPath_DefaultConstructArray(size_t num_elems)
MRC_API MR_EdgePoint * MR_findSteepestDescentPoint_MR_EdgePoint(const MR_MeshPart *mp, const MR_VertScalars *field, const MR_EdgePoint *ep)
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_DefaultConstruct(void)
MRC_API void MR_ComputeSteepestDescentPathSettings_Set_end(MR_ComputeSteepestDescentPathSettings *_this, const MR_MeshTriPoint *value)
MRC_API MR_std_vector_MR_EdgePoint * MR_computeSteepestDescentPath_4(const MR_MeshPart *mp, const MR_VertScalars *field, const MR_MeshTriPoint *start, const MR_ComputeSteepestDescentPathSettings *settings)
struct MR_expected_std_vector_MR_EdgePoint_MR_PathError MR_expected_std_vector_MR_EdgePoint_MR_PathError
Definition MRSurfacePath.h:21
MR_PassBy
Definition common.h:23
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition include/MRCMisc/exports.h:11
Definition MRId.h:42