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/exports.h>
6
7#include <stddef.h>
8#include <stdint.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
30typedef int32_t MR_PathError;
31enum // MR_PathError
32{
37};
38
41
42typedef int32_t MR_ExtremeEdgeType;
43enum // MR_ExtremeEdgeType
44{
45 // where the field not-increases both in left and right triangles
47 // where the field not-decreases both in left and right triangles
49};
50
54
66MRC_API MR_expected_std_vector_MR_EdgePoint_MR_PathError *MR_computeSurfacePath(const MR_MeshPart *mp, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, const int32_t *maxGeodesicIters, const MR_VertBitSet *vertRegion, MR_VertScalars *outSurfaceDistances);
67
77MRC_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 int32_t *maxGeodesicIters);
78
87
98
104
110
116
122
127
133
139
144
150
154
159
164
167
170
175
178
181
187
199
211
218
226
234
241
252
260
265MRC_API float MR_surfacePathLength(const MR_Mesh *mesh, const MR_std_vector_MR_EdgePoint *surfacePath);
266
273
279
280#ifdef __cplusplus
281} // extern "C"
282#endif
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:29
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:14
struct MR_VertScalars MR_VertScalars
Definition MRAggregateFlow.h:17
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
struct MR_std_vector_MR_Vector3f MR_std_vector_MR_Vector3f
Definition MRBestFit.h:26
struct MR_phmap_flat_hash_map_MR_VertId_MR_VertId MR_phmap_flat_hash_map_MR_VertId_MR_VertId
Definition MRBitSet.h:53
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:13
struct MR_std_string MR_std_string
Definition MRE57.h:22
struct MR_std_vector_MR_EdgePoint MR_std_vector_MR_EdgePoint
Definition MREdgePaths.h:28
struct MR_EdgePoint MR_EdgePoint
Definition MREdgePoint.h:21
char MR_GeodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MREnums.h:90
struct MR_std_vector_std_vector_MR_EdgePoint MR_std_vector_std_vector_MR_EdgePoint
Definition MRExtractIsolines.h:27
MRC_API void MR_ComputeSteepestDescentPathSettings_Destroy(const MR_ComputeSteepestDescentPathSettings *_this)
Destroys a heap-allocated instance of MR_ComputeSteepestDescentPathSettings. Does nothing if the poin...
@ MR_ExtremeEdgeType_Gorge
Definition MRSurfacePath.h:48
@ MR_ExtremeEdgeType_Ridge
Definition MRSurfacePath.h:46
MRC_API MR_std_string * MR_toString_MR_PathError(MR_PathError error)
MRC_API const MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_OffsetPtr(const MR_ComputeSteepestDescentPathSettings *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_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_ComputeSteepestDescentPathSettings_DestroyArray(const MR_ComputeSteepestDescentPathSettings *_this)
Destroys a heap-allocated array of MR_ComputeSteepestDescentPathSettings. Does nothing if the pointer...
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_ConstructFromAnother(const MR_ComputeSteepestDescentPathSettings *_other)
struct MR_ComputeSteepestDescentPathSettings MR_ComputeSteepestDescentPathSettings
Generated from class MR::ComputeSteepestDescentPathSettings.
Definition MRSurfacePath.h:40
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 MR_VertId ** MR_ComputeSteepestDescentPathSettings_GetMutable_outVertexReached(MR_ComputeSteepestDescentPathSettings *_this)
int32_t MR_PathError
Definition MRSurfacePath.h:30
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 int32_t *maxGeodesicIters)
MRC_API MR_ComputeSteepestDescentPathSettings * MR_ComputeSteepestDescentPathSettings_OffsetMutablePtr(MR_ComputeSteepestDescentPathSettings *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 *const * MR_ComputeSteepestDescentPathSettings_Get_outVertexReached(const MR_ComputeSteepestDescentPathSettings *_this)
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_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_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)
int32_t MR_ExtremeEdgeType
Definition MRSurfacePath.h:42
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 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_expected_std_vector_MR_EdgePoint_MR_PathError * MR_computeSurfacePath(const MR_MeshPart *mp, const MR_MeshTriPoint *start, const MR_MeshTriPoint *end, const int32_t *maxGeodesicIters, const MR_VertBitSet *vertRegion, MR_VertScalars *outSurfaceDistances)
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_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)
@ MR_PathError_InternalError
Definition MRSurfacePath.h:36
@ MR_PathError_StartEndNotConnected
no path can be found from start to end, because they are not from the same connected component
Definition MRSurfacePath.h:34
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
#define MRC_API
Definition exports.h:11
Definition MRId.h:56