MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshRelax.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
5#include <MRCMesh/MRVector3.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
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_RelaxParams MR_RelaxParams; // Defined in `#include <MRCMesh/MRRelaxParams.h>`.
19typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
20typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
21typedef struct MR_VertScalars MR_VertScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
22typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
23
24
35
44
53
59
64
70
76
81
87
93
98
104
110
115
121
127
132
138
144
149
155
161
166
172
176
181
184
187
191
194
199
203
208
212
217
220
223
229
239
248
254
258MRC_API MR_Vector3f MR_vertexPosEqualNeiAreas_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool noShrinkage);
259
266
272
279
285
290
296
302
307
313
319
324
330
336
341
347
353
358
364
370
375
381
387
392
398
402
407
410
413
417
420
424
427
432
435
438
444
454
463
474
483
490
496
503
508
512
517
523
528
534
540
545
551
557
562
568
574
579
585
591
596
602
608
613
619
625
630
636
640
645
648
651
655
658
662
665
670
673
676
682
693
702
707MRC_API void MR_removeSpikes_4(MR_Mesh *mesh, int maxIterations, float minSumAngle, const MR_VertBitSet *region);
708
713MRC_API void MR_removeSpikes_5(const MR_MeshTopology *topology, MR_VertCoords *points, int maxIterations, float minSumAngle, const MR_VertBitSet *region);
714
723MRC_API void MR_smoothRegionBoundary(MR_Mesh *mesh, const MR_FaceBitSet *regionFaces, const int *numIters);
724
730
736
737#ifdef __cplusplus
738} // extern "C"
739#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:15
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:21
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:22
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
struct MR_VertScalars MR_VertScalars
Definition MRAggregateFlow.h:17
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MRC_API const MR_MeshEqualizeTriAreasParams * MR_MeshEqualizeTriAreasParams_OffsetPtr(const MR_MeshEqualizeTriAreasParams *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_MeshRelaxParams * MR_MeshRelaxParams_ConstructFromAnother(const MR_MeshRelaxParams *_other)
MRC_API const MR_MeshEqualizeTriAreasParams * MR_MeshRelaxParams_StaticDowncastTo_MR_MeshEqualizeTriAreasParams(const MR_MeshRelaxParams *object)
struct MR_MeshApproxRelaxParams MR_MeshApproxRelaxParams
Definition MRMeshRelax.h:52
MRC_API bool MR_relaxApprox_3_MR_Mesh(MR_Mesh *mesh, const MR_MeshApproxRelaxParams *params, const MR_std_function_bool_from_float *cb)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_force(MR_MeshEqualizeTriAreasParams *_this, float value)
MRC_API const MR_MeshRelaxParams * MR_MeshApproxRelaxParams_UpcastTo_MR_MeshRelaxParams(const MR_MeshApproxRelaxParams *object)
MRC_API void MR_MeshEqualizeTriAreasParams_Destroy(const MR_MeshEqualizeTriAreasParams *_this)
Destroys a heap-allocated instance of MR_MeshEqualizeTriAreasParams. Does nothing if the pointer is n...
MRC_API const MR_MeshRelaxParams * MR_MeshRelaxParams_OffsetPtr(const MR_MeshRelaxParams *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_MeshApproxRelaxParams * MR_MeshApproxRelaxParams_DefaultConstructArray(size_t num_elems)
struct MR_MeshEqualizeTriAreasParams MR_MeshEqualizeTriAreasParams
Definition MRMeshRelax.h:43
MRC_API const MR_VertBitSet *const * MR_MeshRelaxParams_Get_region(const MR_MeshRelaxParams *_this)
MRC_API const MR_VertBitSet ** MR_MeshApproxRelaxParams_GetMutable_region(MR_MeshApproxRelaxParams *_this)
MRC_API const MR_VertBitSet ** MR_MeshRelaxParams_GetMutable_region(MR_MeshRelaxParams *_this)
MRC_API const float * MR_MeshRelaxParams_Get_maxInitialDist(const MR_MeshRelaxParams *_this)
MRC_API MR_MeshRelaxParams * MR_MeshRelaxParams_DefaultConstruct(void)
MRC_API void MR_MeshApproxRelaxParams_Set_maxInitialDist(MR_MeshApproxRelaxParams *_this, float value)
MRC_API const bool * MR_MeshEqualizeTriAreasParams_Get_limitNearInitial(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API const int * MR_MeshApproxRelaxParams_Get_iterations(const MR_MeshApproxRelaxParams *_this)
MRC_API float * MR_MeshApproxRelaxParams_GetMutable_force(MR_MeshApproxRelaxParams *_this)
MRC_API bool MR_relax_4(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_MeshRelaxParams *params, const MR_std_function_bool_from_float *cb)
MRC_API void MR_MeshApproxRelaxParams_Set_weights(MR_MeshApproxRelaxParams *_this, const MR_VertScalars *value)
MRC_API MR_Vector3f MR_vertexPosEqualNeiAreas_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool noShrinkage)
MRC_API const int * MR_MeshRelaxParams_Get_iterations(const MR_MeshRelaxParams *_this)
MRC_API const float * MR_MeshRelaxParams_Get_force(const MR_MeshRelaxParams *_this)
MRC_API MR_MeshEqualizeTriAreasParams * MR_MeshEqualizeTriAreasParams_ConstructFromAnother(const MR_MeshEqualizeTriAreasParams *_other)
MRC_API const MR_VertScalars ** MR_MeshEqualizeTriAreasParams_GetMutable_weights(MR_MeshEqualizeTriAreasParams *_this)
MRC_API MR_MeshEqualizeTriAreasParams * MR_MeshRelaxParams_MutableStaticDowncastTo_MR_MeshEqualizeTriAreasParams(MR_MeshRelaxParams *object)
MRC_API void MR_hardSmoothTetrahedrons_2(MR_Mesh *mesh, const MR_VertBitSet *region)
MRC_API void MR_MeshApproxRelaxParams_Destroy(const MR_MeshApproxRelaxParams *_this)
Destroys a heap-allocated instance of MR_MeshApproxRelaxParams. Does nothing if the pointer is null.
MRC_API void MR_MeshRelaxParams_Set_region(MR_MeshRelaxParams *_this, const MR_VertBitSet *value)
MRC_API const MR_VertScalars *const * MR_MeshEqualizeTriAreasParams_Get_weights(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API const bool * MR_MeshEqualizeTriAreasParams_Get_hardSmoothTetrahedrons(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API bool MR_relaxKeepVolume_3_MR_Mesh(MR_Mesh *mesh, const MR_MeshRelaxParams *params, const MR_std_function_bool_from_float *cb)
MRC_API void MR_MeshApproxRelaxParams_Set_limitNearInitial(MR_MeshApproxRelaxParams *_this, bool value)
MRC_API const MR_RelaxParams * MR_MeshEqualizeTriAreasParams_UpcastTo_MR_RelaxParams(const MR_MeshEqualizeTriAreasParams *object)
MRC_API MR_MeshEqualizeTriAreasParams * MR_MeshEqualizeTriAreasParams_AssignFromAnother(MR_MeshEqualizeTriAreasParams *_this, const MR_MeshEqualizeTriAreasParams *_other)
MRC_API const MR_VertBitSet *const * MR_MeshEqualizeTriAreasParams_Get_region(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API bool * MR_MeshRelaxParams_GetMutable_limitNearInitial(MR_MeshRelaxParams *_this)
MRC_API MR_Vector3f MR_vertexPosEqualNeiAreas_3(const MR_Mesh *mesh, MR_VertId v, bool noShrinkage)
MRC_API const float * MR_MeshApproxRelaxParams_Get_maxInitialDist(const MR_MeshApproxRelaxParams *_this)
MRC_API const float * MR_MeshApproxRelaxParams_Get_surfaceDilateRadius(const MR_MeshApproxRelaxParams *_this)
MRC_API float * MR_MeshRelaxParams_GetMutable_maxInitialDist(MR_MeshRelaxParams *_this)
MRC_API MR_MeshEqualizeTriAreasParams * MR_MeshEqualizeTriAreasParams_DefaultConstruct(void)
MRC_API void MR_MeshApproxRelaxParams_Set_surfaceDilateRadius(MR_MeshApproxRelaxParams *_this, float value)
MRC_API const bool * MR_MeshEqualizeTriAreasParams_Get_noShrinkage(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API void MR_MeshApproxRelaxParams_Set_hardSmoothTetrahedrons(MR_MeshApproxRelaxParams *_this, bool value)
MRC_API MR_MeshApproxRelaxParams * MR_MeshApproxRelaxParams_ConstructFromAnother(const MR_MeshApproxRelaxParams *_other)
MRC_API bool * MR_MeshEqualizeTriAreasParams_GetMutable_limitNearInitial(MR_MeshEqualizeTriAreasParams *_this)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_noShrinkage(MR_MeshEqualizeTriAreasParams *_this, bool value)
MRC_API const bool * MR_MeshApproxRelaxParams_Get_hardSmoothTetrahedrons(const MR_MeshApproxRelaxParams *_this)
MRC_API MR_MeshEqualizeTriAreasParams * MR_MeshEqualizeTriAreasParams_DefaultConstructArray(size_t num_elems)
MRC_API void MR_MeshRelaxParams_Set_weights(MR_MeshRelaxParams *_this, const MR_VertScalars *value)
MRC_API int * MR_MeshRelaxParams_GetMutable_iterations(MR_MeshRelaxParams *_this)
MRC_API int * MR_MeshEqualizeTriAreasParams_GetMutable_iterations(MR_MeshEqualizeTriAreasParams *_this)
MRC_API MR_MeshEqualizeTriAreasParams * MR_MeshEqualizeTriAreasParams_OffsetMutablePtr(MR_MeshEqualizeTriAreasParams *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_VertBitSet *const * MR_MeshApproxRelaxParams_Get_region(const MR_MeshApproxRelaxParams *_this)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_hardSmoothTetrahedrons(MR_MeshEqualizeTriAreasParams *_this, bool value)
MRC_API const MR_RelaxApproxType * MR_MeshApproxRelaxParams_Get_type(const MR_MeshApproxRelaxParams *_this)
MRC_API void MR_MeshApproxRelaxParams_DestroyArray(const MR_MeshApproxRelaxParams *_this)
Destroys a heap-allocated array of MR_MeshApproxRelaxParams. Does nothing if the pointer is null.
MRC_API const float * MR_MeshApproxRelaxParams_Get_force(const MR_MeshApproxRelaxParams *_this)
MRC_API const float * MR_MeshEqualizeTriAreasParams_Get_maxInitialDist(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API void MR_MeshRelaxParams_Set_maxInitialDist(MR_MeshRelaxParams *_this, float value)
MRC_API void MR_MeshRelaxParams_DestroyArray(const MR_MeshRelaxParams *_this)
Destroys a heap-allocated array of MR_MeshRelaxParams. Does nothing if the pointer is null.
MRC_API const int * MR_MeshEqualizeTriAreasParams_Get_iterations(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API void MR_hardSmoothTetrahedrons_3(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *region)
MRC_API bool MR_relaxApprox_4(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_MeshApproxRelaxParams *params, const MR_std_function_bool_from_float *cb)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_iterations(MR_MeshEqualizeTriAreasParams *_this, int value)
MRC_API void MR_MeshRelaxParams_Destroy(const MR_MeshRelaxParams *_this)
Destroys a heap-allocated instance of MR_MeshRelaxParams. Does nothing if the pointer is null.
MRC_API const MR_MeshApproxRelaxParams * MR_MeshApproxRelaxParams_OffsetPtr(const MR_MeshApproxRelaxParams *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_MeshApproxRelaxParams_Set_type(MR_MeshApproxRelaxParams *_this, MR_RelaxApproxType value)
MRC_API void MR_MeshApproxRelaxParams_Set_force(MR_MeshApproxRelaxParams *_this, float value)
MRC_API float * MR_MeshApproxRelaxParams_GetMutable_surfaceDilateRadius(MR_MeshApproxRelaxParams *_this)
MRC_API bool MR_equalizeTriAreas_4(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_MeshEqualizeTriAreasParams *params, const MR_std_function_bool_from_float *cb)
MRC_API void MR_MeshRelaxParams_Set_iterations(MR_MeshRelaxParams *_this, int value)
MRC_API bool * MR_MeshEqualizeTriAreasParams_GetMutable_noShrinkage(MR_MeshEqualizeTriAreasParams *_this)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_region(MR_MeshEqualizeTriAreasParams *_this, const MR_VertBitSet *value)
MRC_API bool MR_equalizeTriAreas_3(MR_Mesh *mesh, const MR_MeshEqualizeTriAreasParams *params, const MR_std_function_bool_from_float *cb)
MRC_API const float * MR_MeshEqualizeTriAreasParams_Get_force(const MR_MeshEqualizeTriAreasParams *_this)
MRC_API bool MR_relaxKeepVolume_4(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_MeshRelaxParams *params, const MR_std_function_bool_from_float *cb)
MRC_API float * MR_MeshEqualizeTriAreasParams_GetMutable_maxInitialDist(MR_MeshEqualizeTriAreasParams *_this)
MRC_API MR_MeshRelaxParams * MR_MeshRelaxParams_DefaultConstructArray(size_t num_elems)
MRC_API const bool * MR_MeshApproxRelaxParams_Get_limitNearInitial(const MR_MeshApproxRelaxParams *_this)
MRC_API void MR_smoothRegionBoundary(MR_Mesh *mesh, const MR_FaceBitSet *regionFaces, const int *numIters)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_weights(MR_MeshEqualizeTriAreasParams *_this, const MR_VertScalars *value)
MRC_API MR_MeshRelaxParams * MR_MeshEqualizeTriAreasParams_MutableUpcastTo_MR_MeshRelaxParams(MR_MeshEqualizeTriAreasParams *object)
Upcasts an instance of MR::MeshEqualizeTriAreasParams to its base class MR::MeshRelaxParams.
MRC_API MR_MeshApproxRelaxParams * MR_MeshApproxRelaxParams_DefaultConstruct(void)
MRC_API MR_RelaxApproxType * MR_MeshApproxRelaxParams_GetMutable_type(MR_MeshApproxRelaxParams *_this)
MRC_API float * MR_MeshApproxRelaxParams_GetMutable_maxInitialDist(MR_MeshApproxRelaxParams *_this)
MRC_API void MR_removeSpikes_5(const MR_MeshTopology *topology, MR_VertCoords *points, int maxIterations, float minSumAngle, const MR_VertBitSet *region)
MRC_API const MR_RelaxParams * MR_MeshApproxRelaxParams_UpcastTo_MR_RelaxParams(const MR_MeshApproxRelaxParams *object)
MRC_API void MR_MeshRelaxParams_Set_limitNearInitial(MR_MeshRelaxParams *_this, bool value)
MRC_API const MR_VertScalars ** MR_MeshRelaxParams_GetMutable_weights(MR_MeshRelaxParams *_this)
MRC_API float * MR_MeshRelaxParams_GetMutable_force(MR_MeshRelaxParams *_this)
MRC_API bool MR_relax_3_MR_Mesh(MR_Mesh *mesh, const MR_MeshRelaxParams *params, const MR_std_function_bool_from_float *cb)
MRC_API MR_RelaxParams * MR_MeshApproxRelaxParams_MutableUpcastTo_MR_RelaxParams(MR_MeshApproxRelaxParams *object)
Upcasts an instance of MR::MeshApproxRelaxParams to its base class MR::RelaxParams.
MRC_API const MR_VertScalars *const * MR_MeshRelaxParams_Get_weights(const MR_MeshRelaxParams *_this)
MRC_API const MR_VertBitSet ** MR_MeshEqualizeTriAreasParams_GetMutable_region(MR_MeshEqualizeTriAreasParams *_this)
MRC_API const MR_VertScalars ** MR_MeshApproxRelaxParams_GetMutable_weights(MR_MeshApproxRelaxParams *_this)
MRC_API const bool * MR_MeshRelaxParams_Get_limitNearInitial(const MR_MeshRelaxParams *_this)
MRC_API const MR_RelaxParams * MR_MeshRelaxParams_UpcastTo_MR_RelaxParams(const MR_MeshRelaxParams *object)
MRC_API MR_MeshRelaxParams * MR_MeshRelaxParams_OffsetMutablePtr(MR_MeshRelaxParams *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 bool * MR_MeshApproxRelaxParams_GetMutable_hardSmoothTetrahedrons(MR_MeshApproxRelaxParams *_this)
struct MR_RelaxParams MR_RelaxParams
Definition MRMeshRelax.h:18
MRC_API const MR_VertScalars *const * MR_MeshApproxRelaxParams_Get_weights(const MR_MeshApproxRelaxParams *_this)
MRC_API MR_MeshRelaxParams * MR_MeshApproxRelaxParams_MutableUpcastTo_MR_MeshRelaxParams(MR_MeshApproxRelaxParams *object)
Upcasts an instance of MR::MeshApproxRelaxParams to its base class MR::MeshRelaxParams.
MRC_API void MR_MeshApproxRelaxParams_Set_region(MR_MeshApproxRelaxParams *_this, const MR_VertBitSet *value)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_maxInitialDist(MR_MeshEqualizeTriAreasParams *_this, float value)
MRC_API void MR_MeshEqualizeTriAreasParams_DestroyArray(const MR_MeshEqualizeTriAreasParams *_this)
Destroys a heap-allocated array of MR_MeshEqualizeTriAreasParams. Does nothing if the pointer is null...
MRC_API int * MR_MeshApproxRelaxParams_GetMutable_iterations(MR_MeshApproxRelaxParams *_this)
MRC_API MR_RelaxParams * MR_MeshEqualizeTriAreasParams_MutableUpcastTo_MR_RelaxParams(MR_MeshEqualizeTriAreasParams *object)
Upcasts an instance of MR::MeshEqualizeTriAreasParams to its base class MR::RelaxParams.
struct MR_MeshRelaxParams MR_MeshRelaxParams
Definition MRMeshRelax.h:34
MRC_API bool * MR_MeshApproxRelaxParams_GetMutable_limitNearInitial(MR_MeshApproxRelaxParams *_this)
MRC_API MR_MeshApproxRelaxParams * MR_MeshApproxRelaxParams_OffsetMutablePtr(MR_MeshApproxRelaxParams *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_MeshRelaxParams_Set_hardSmoothTetrahedrons(MR_MeshRelaxParams *_this, bool value)
MRC_API MR_MeshApproxRelaxParams * MR_MeshRelaxParams_MutableStaticDowncastTo_MR_MeshApproxRelaxParams(MR_MeshRelaxParams *object)
MRC_API MR_MeshRelaxParams * MR_MeshRelaxParams_AssignFromAnother(MR_MeshRelaxParams *_this, const MR_MeshRelaxParams *_other)
MRC_API bool * MR_MeshEqualizeTriAreasParams_GetMutable_hardSmoothTetrahedrons(MR_MeshEqualizeTriAreasParams *_this)
MRC_API bool * MR_MeshRelaxParams_GetMutable_hardSmoothTetrahedrons(MR_MeshRelaxParams *_this)
MRC_API const MR_MeshApproxRelaxParams * MR_MeshRelaxParams_StaticDowncastTo_MR_MeshApproxRelaxParams(const MR_MeshRelaxParams *object)
MRC_API MR_MeshApproxRelaxParams * MR_MeshApproxRelaxParams_AssignFromAnother(MR_MeshApproxRelaxParams *_this, const MR_MeshApproxRelaxParams *_other)
MRC_API void MR_removeSpikes_4(MR_Mesh *mesh, int maxIterations, float minSumAngle, const MR_VertBitSet *region)
MRC_API void MR_MeshRelaxParams_Set_force(MR_MeshRelaxParams *_this, float value)
MRC_API void MR_MeshEqualizeTriAreasParams_Set_limitNearInitial(MR_MeshEqualizeTriAreasParams *_this, bool value)
MRC_API const MR_MeshRelaxParams * MR_MeshEqualizeTriAreasParams_UpcastTo_MR_MeshRelaxParams(const MR_MeshEqualizeTriAreasParams *object)
MRC_API void MR_MeshApproxRelaxParams_Set_iterations(MR_MeshApproxRelaxParams *_this, int value)
MRC_API float * MR_MeshEqualizeTriAreasParams_GetMutable_force(MR_MeshEqualizeTriAreasParams *_this)
MRC_API const bool * MR_MeshRelaxParams_Get_hardSmoothTetrahedrons(const MR_MeshRelaxParams *_this)
MRC_API MR_RelaxParams * MR_MeshRelaxParams_MutableUpcastTo_MR_RelaxParams(MR_MeshRelaxParams *object)
Upcasts an instance of MR::MeshRelaxParams to its base class MR::RelaxParams.
MR_RelaxApproxType
Definition MRRelaxParams.h:33
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:52
Definition MRId.h:55