MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshDelone.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMisc/exports.h>
5
6#include <stdbool.h>
7#include <stddef.h>
8#include <stdint.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_EdgeLengthMesh MR_EdgeLengthMesh; // Defined in `#include <MRCMesh/MREdgeLengthMesh.h>`.
15typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
18typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
19typedef struct MR_Vector3d MR_Vector3d; // Defined in `#include <MRCMesh/MRVector3.h>`.
20typedef struct MR_Vector3f MR_Vector3f; // Defined in `#include <MRCMesh/MRVector3.h>`.
21typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
22typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
23typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
24
25
28
29typedef int32_t MR_FlipEdge;
30enum // MR_FlipEdge
31{
38};
39
42
48
53
59
65
70
76
83
89
96
102
107
113
119
124
130
136
141
147
151
156
159MRC_API MR_DeloneSettings *MR_DeloneSettings_ConstructFrom(float maxDeviationAfterFlip, float maxAngleChange, float criticalTriAspectRatio, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *notFlippable, const MR_VertBitSet *vertRegion);
160
163
166
171
174
177
183
195MRC_API bool MR_checkDeloneQuadrangle_MR_Vector3d(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, const MR_Vector3d *d, const double *maxAngleChange);
196
204MRC_API bool MR_checkDeloneQuadrangle_MR_Vector3f(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, const MR_Vector3f *d, const float *maxAngleChange);
205
212MRC_API MR_FlipEdge MR_canFlipEdge(const MR_MeshTopology *topology, MR_EdgeId edge, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *notFlippable, const MR_VertBitSet *vertRegion);
213
222MRC_API bool MR_checkDeloneQuadrangleInMesh_4(const MR_Mesh *mesh, MR_EdgeId edge, const MR_DeloneSettings *settings, float *deviationSqAfterFlip);
223
230MRC_API bool MR_checkDeloneQuadrangleInMesh_5(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId edge, const MR_DeloneSettings *settings, float *deviationSqAfterFlip);
231
241
248
255
268MRC_API int32_t MR_makeDeloneEdgeFlips_4_MR_Mesh(MR_Mesh *mesh, const MR_DeloneSettings *settings, const int32_t *numIters, const MR_std_function_bool_from_float *progressCallback);
269
278MRC_API int32_t MR_makeDeloneEdgeFlips_5(MR_MeshTopology *topology, const MR_VertCoords *points, const MR_DeloneSettings *settings, const int32_t *numIters, const MR_std_function_bool_from_float *progressCallback);
279
286
292
299
305
310
316
322
327
333
339
344
350
354
359
363
366
369
374
377
380
386
400MRC_API int32_t MR_makeDeloneEdgeFlips_4_MR_EdgeLengthMesh(MR_EdgeLengthMesh *mesh, const MR_IntrinsicDeloneSettings *settings, const int32_t *numIters, const MR_std_function_bool_from_float *progressCallback);
401
402#ifdef __cplusplus
403} // extern "C"
404#endif
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_Mesh MR_Mesh
Definition MRCtm.h:13
struct MR_EdgeLengthMesh MR_EdgeLengthMesh
Definition MREdgeLengthMesh.h:23
MRC_API bool MR_checkDeloneQuadrangleInMesh_5(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId edge, const MR_DeloneSettings *settings, float *deviationSqAfterFlip)
MRC_API bool MR_checkDeloneQuadrangle_MR_Vector3d(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, const MR_Vector3d *d, const double *maxAngleChange)
MRC_API float * MR_DeloneSettings_GetMutable_criticalTriAspectRatio(MR_DeloneSettings *_this)
MRC_API int32_t MR_makeDeloneEdgeFlips_4_MR_Mesh(MR_Mesh *mesh, const MR_DeloneSettings *settings, const int32_t *numIters, const MR_std_function_bool_from_float *progressCallback)
MRC_API const float * MR_IntrinsicDeloneSettings_Get_threshold(const MR_IntrinsicDeloneSettings *_this)
MRC_API MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_AssignFromAnother(MR_IntrinsicDeloneSettings *_this, const MR_IntrinsicDeloneSettings *_other)
MRC_API MR_DeloneSettings * MR_DeloneSettings_DefaultConstructArray(size_t num_elems)
MRC_API const MR_VertBitSet *const * MR_DeloneSettings_Get_vertRegion(const MR_DeloneSettings *_this)
@ MR_FlipEdge_Can
edge flipping is possible
Definition MRMeshDelone.h:33
@ MR_FlipEdge_Cannot
edge flipping is required to solve some topology issue
Definition MRMeshDelone.h:35
@ MR_FlipEdge_Must
Definition MRMeshDelone.h:37
MRC_API void MR_IntrinsicDeloneSettings_Set_region(MR_IntrinsicDeloneSettings *_this, const MR_FaceBitSet *value)
MRC_API const MR_UndirectedEdgeBitSet *const * MR_DeloneSettings_Get_notFlippable(const MR_DeloneSettings *_this)
MRC_API MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_OffsetMutablePtr(MR_IntrinsicDeloneSettings *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_DeloneSettings_Set_maxDeviationAfterFlip(MR_DeloneSettings *_this, float value)
MRC_API const MR_FaceBitSet ** MR_DeloneSettings_GetMutable_region(MR_DeloneSettings *_this)
struct MR_IntrinsicDeloneSettings MR_IntrinsicDeloneSettings
Generated from class MR::IntrinsicDeloneSettings.
Definition MRMeshDelone.h:41
MRC_API const MR_UndirectedEdgeBitSet ** MR_IntrinsicDeloneSettings_GetMutable_notFlippable(MR_IntrinsicDeloneSettings *_this)
int32_t MR_FlipEdge
Definition MRMeshDelone.h:29
MRC_API MR_FlipEdge MR_canFlipEdge(const MR_MeshTopology *topology, MR_EdgeId edge, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *notFlippable, const MR_VertBitSet *vertRegion)
MRC_API bool MR_bestQuadrangleDiagonal(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, const MR_Vector3f *d)
MRC_API void MR_makeDeloneOriginRing_3(MR_Mesh *mesh, MR_EdgeId e, const MR_DeloneSettings *settings)
MRC_API const MR_UndirectedEdgeBitSet *const * MR_IntrinsicDeloneSettings_Get_notFlippable(const MR_IntrinsicDeloneSettings *_this)
MRC_API MR_DeloneSettings * MR_DeloneSettings_ConstructFrom(float maxDeviationAfterFlip, float maxAngleChange, float criticalTriAspectRatio, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *notFlippable, const MR_VertBitSet *vertRegion)
MRC_API const MR_UndirectedEdgeBitSet ** MR_DeloneSettings_GetMutable_notFlippable(MR_DeloneSettings *_this)
MRC_API const MR_DeloneSettings * MR_DeloneSettings_OffsetPtr(const MR_DeloneSettings *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_IntrinsicDeloneSettings_Destroy(const MR_IntrinsicDeloneSettings *_this)
Destroys a heap-allocated instance of MR_IntrinsicDeloneSettings. Does nothing if the pointer is null...
MRC_API MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_DefaultConstructArray(size_t num_elems)
MRC_API MR_DeloneSettings * MR_DeloneSettings_OffsetMutablePtr(MR_DeloneSettings *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 MR_FaceBitSet *const * MR_DeloneSettings_Get_region(const MR_DeloneSettings *_this)
MRC_API const float * MR_DeloneSettings_Get_criticalTriAspectRatio(const MR_DeloneSettings *_this)
MRC_API void MR_DeloneSettings_DestroyArray(const MR_DeloneSettings *_this)
Destroys a heap-allocated array of MR_DeloneSettings. Does nothing if the pointer is null.
MRC_API MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_DefaultConstruct(void)
MRC_API void MR_makeDeloneOriginRing_4(MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, const MR_DeloneSettings *settings)
MRC_API void MR_IntrinsicDeloneSettings_Set_notFlippable(MR_IntrinsicDeloneSettings *_this, const MR_UndirectedEdgeBitSet *value)
MRC_API int32_t MR_makeDeloneEdgeFlips_5(MR_MeshTopology *topology, const MR_VertCoords *points, const MR_DeloneSettings *settings, const int32_t *numIters, const MR_std_function_bool_from_float *progressCallback)
MRC_API void MR_DeloneSettings_Set_notFlippable(MR_DeloneSettings *_this, const MR_UndirectedEdgeBitSet *value)
MRC_API float * MR_DeloneSettings_GetMutable_maxAngleChange(MR_DeloneSettings *_this)
MRC_API void MR_IntrinsicDeloneSettings_DestroyArray(const MR_IntrinsicDeloneSettings *_this)
Destroys a heap-allocated array of MR_IntrinsicDeloneSettings. Does nothing if the pointer is null.
MRC_API void MR_DeloneSettings_Destroy(const MR_DeloneSettings *_this)
Destroys a heap-allocated instance of MR_DeloneSettings. Does nothing if the pointer is null.
MRC_API void MR_DeloneSettings_Set_criticalTriAspectRatio(MR_DeloneSettings *_this, float value)
MRC_API const float * MR_DeloneSettings_Get_maxDeviationAfterFlip(const MR_DeloneSettings *_this)
MRC_API MR_DeloneSettings * MR_DeloneSettings_AssignFromAnother(MR_DeloneSettings *_this, const MR_DeloneSettings *_other)
MRC_API const MR_VertBitSet ** MR_DeloneSettings_GetMutable_vertRegion(MR_DeloneSettings *_this)
MRC_API void MR_DeloneSettings_Set_maxAngleChange(MR_DeloneSettings *_this, float value)
MRC_API MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_ConstructFrom(float threshold, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *notFlippable, const MR_VertBitSet *vertRegion)
MRC_API MR_DeloneSettings * MR_DeloneSettings_ConstructFromAnother(const MR_DeloneSettings *_other)
MRC_API float * MR_DeloneSettings_GetMutable_maxDeviationAfterFlip(MR_DeloneSettings *_this)
MRC_API const MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_OffsetPtr(const MR_IntrinsicDeloneSettings *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 MR_FaceBitSet ** MR_IntrinsicDeloneSettings_GetMutable_region(MR_IntrinsicDeloneSettings *_this)
MRC_API float * MR_IntrinsicDeloneSettings_GetMutable_threshold(MR_IntrinsicDeloneSettings *_this)
MRC_API void MR_IntrinsicDeloneSettings_Set_threshold(MR_IntrinsicDeloneSettings *_this, float value)
MRC_API MR_IntrinsicDeloneSettings * MR_IntrinsicDeloneSettings_ConstructFromAnother(const MR_IntrinsicDeloneSettings *_other)
MRC_API int32_t MR_makeDeloneEdgeFlips_4_MR_EdgeLengthMesh(MR_EdgeLengthMesh *mesh, const MR_IntrinsicDeloneSettings *settings, const int32_t *numIters, const MR_std_function_bool_from_float *progressCallback)
MRC_API void MR_DeloneSettings_Set_region(MR_DeloneSettings *_this, const MR_FaceBitSet *value)
MRC_API const float * MR_DeloneSettings_Get_maxAngleChange(const MR_DeloneSettings *_this)
MRC_API bool MR_checkDeloneQuadrangle_MR_Vector3f(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, const MR_Vector3f *d, const float *maxAngleChange)
MRC_API void MR_DeloneSettings_Set_vertRegion(MR_DeloneSettings *_this, const MR_VertBitSet *value)
MRC_API bool MR_checkDeloneQuadrangleInMesh_4(const MR_Mesh *mesh, MR_EdgeId edge, const MR_DeloneSettings *settings, float *deviationSqAfterFlip)
MRC_API const MR_VertBitSet ** MR_IntrinsicDeloneSettings_GetMutable_vertRegion(MR_IntrinsicDeloneSettings *_this)
MRC_API void MR_IntrinsicDeloneSettings_Set_vertRegion(MR_IntrinsicDeloneSettings *_this, const MR_VertBitSet *value)
struct MR_DeloneSettings MR_DeloneSettings
Generated from class MR::DeloneSettings.
Definition MRMeshDelone.h:27
MRC_API MR_DeloneSettings * MR_DeloneSettings_DefaultConstruct(void)
MRC_API const MR_VertBitSet *const * MR_IntrinsicDeloneSettings_Get_vertRegion(const MR_IntrinsicDeloneSettings *_this)
MRC_API const MR_FaceBitSet *const * MR_IntrinsicDeloneSettings_Get_region(const MR_IntrinsicDeloneSettings *_this)
#define MRC_API
Definition exports.h:11
Definition MRId.h:152
Definition MRVector3.h:60
Definition MRVector3.h:51