MeshLib C Docs
Loading...
Searching...
No Matches
MRPositionVertsSmoothly.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MREnums.h>
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
15typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
16typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
17typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
18typedef struct MR_VertScalars MR_VertScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
19typedef struct MR_std_function_bool_from_MR_FaceId MR_std_function_bool_from_MR_FaceId; // Defined in `#include <MRCMisc/std_function_bool_from_MR_FaceId.h>`.
20typedef struct MR_std_function_float_from_MR_UndirectedEdgeId MR_std_function_float_from_MR_UndirectedEdgeId; // Defined in `#include <MRCMisc/std_function_float_from_MR_UndirectedEdgeId.h>`.
21typedef struct MR_std_function_float_from_MR_VertId MR_std_function_float_from_MR_VertId; // Defined in `#include <MRCMisc/std_function_float_from_MR_VertId.h>`.
22
23
27
31
35
39
49MRC_API void MR_positionVertsSmoothly_5(MR_Mesh *mesh, const MR_VertBitSet *verts, const MR_EdgeWeights *edgeWeights, const MR_VertexMass *vmass, const MR_VertBitSet *fixedSharpVertices);
50
58MRC_API void MR_positionVertsSmoothly_6(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *verts, const MR_EdgeWeights *edgeWeights, const MR_VertexMass *vmass, const MR_VertBitSet *fixedSharpVertices);
59
67
75
83
90
97
104
111
117
124
131
138
145
152
159
166
170
175
184
188
192
197
200
203
210
216
222
227
235
243
251
258
265
272
279
286
293
300
306
313
320
327
334
341
348
355
359
364
373MRC_API MR_InterpolateScalarsParams *MR_InterpolateScalarsParams_ConstructFrom(const MR_VertBitSet *region, MR_EdgeWeights edgeWeights, MR_VertexMass vmass, float stabilizer, MR_PassBy vertStabilizers_pass_by, MR_std_function_float_from_MR_VertId *vertStabilizers, MR_PassBy edgeWeightsMetric_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *edgeWeightsMetric);
374
378
382
387
390
393
400
409
416
423
430
437
444
445// must be defined by the caller
451
452// must be defined by the caller
458
459// must be defined by the caller
465
472
478
485
492
498
505
512
518
525
532
539
546
550
555
562MRC_API MR_SpacingSettings *MR_SpacingSettings_ConstructFrom(const MR_VertBitSet *region, MR_PassBy dist_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *dist, int numIters, float stabilizer, float maxSumNegW, MR_PassBy isInverted_pass_by, MR_std_function_bool_from_MR_FaceId *isInverted);
563
567
571
576
579
582
589
595
601
610
618
627
635
642
650
658
665
673
680
686
693
697
702
706MRC_API MR_InflateSettings *MR_InflateSettings_ConstructFrom(float pressure, int iterations, bool preSmooth, bool gradualPressureGrowth);
707
711
715
721
724
727
735
743MRC_API void MR_inflate_3(MR_Mesh *mesh, const MR_VertBitSet *verts, const MR_InflateSettings *settings);
744
750MRC_API void MR_inflate_4(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *verts, const MR_InflateSettings *settings);
751
759MRC_API void MR_inflate1(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *verts, float pressure);
760
761#ifdef __cplusplus
762} // extern "C"
763#endif
struct MR_VertCoords MR_VertCoords
std::vector<T>-like container that requires specific indexing type,
Definition MRAABBTreePoints.h:21
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:22
struct MR_VertScalars MR_VertScalars
std::vector<T>-like container that requires specific indexing type,
Definition MRAggregateFlow.h:17
struct MR_MeshTopology MR_MeshTopology
Definition MRCameraPointsTriangulation.h:14
struct MR_std_function_float_from_MR_VertId MR_std_function_float_from_MR_VertId
Definition MRClosestWeightedPoint.h:18
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
struct MR_std_function_bool_from_MR_FaceId MR_std_function_bool_from_MR_FaceId
Definition MREnumNeighbours.h:18
MR_EdgeWeights
determines the weight of each edge in applications like Laplacian
Definition MREnums.h:50
MR_VertexMass
determines the weight or mass of each vertex in applications like Laplacian
Definition MREnums.h:41
MRC_API const bool * MR_InflateSettings_Get_gradualPressureGrowth(const MR_InflateSettings *_this)
MRC_API MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_DefaultConstruct(void)
MRC_API MR_InflateSettings * MR_InflateSettings_DefaultConstructArray(size_t num_elems)
MRC_API MR_InflateSettings * MR_InflateSettings_OffsetMutablePtr(MR_InflateSettings *ptr, ptrdiff_t i)
MRC_API const int * MR_SpacingSettings_Get_numIters(const MR_SpacingSettings *_this)
struct MR_PositionVertsSmoothlyParams MR_PositionVertsSmoothlyParams
Definition MRPositionVertsSmoothly.h:26
MRC_API void MR_InflateSettings_Set_gradualPressureGrowth(MR_InflateSettings *_this, bool value)
MRC_API void MR_SpacingSettings_Set_maxSumNegW(MR_SpacingSettings *_this, float value)
MRC_API const MR_VertCoords *const * MR_PositionVertsSmoothlyParams_Get_vertShifts(const MR_PositionVertsSmoothlyParams *_this)
MRC_API void MR_SpacingSettings_Set_stabilizer(MR_SpacingSettings *_this, float value)
MRC_API const MR_std_function_bool_from_MR_FaceId * MR_SpacingSettings_Get_isInverted(const MR_SpacingSettings *_this)
MRC_API const float * MR_InterpolateScalarsParams_Get_stabilizer(const MR_InterpolateScalarsParams *_this)
MRC_API const MR_SpacingSettings * MR_SpacingSettings_OffsetPtr(const MR_SpacingSettings *ptr, ptrdiff_t i)
MRC_API MR_InflateSettings * MR_InflateSettings_ConstructFrom(float pressure, int iterations, bool preSmooth, bool gradualPressureGrowth)
MRC_API void MR_PositionVertsSmoothlyParams_DestroyArray(const MR_PositionVertsSmoothlyParams *_this)
Destroys a heap-allocated array of MR_PositionVertsSmoothlyParams. Does nothing if the pointer is nul...
MRC_API MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_ConstructFrom(const MR_VertBitSet *region, MR_EdgeWeights edgeWeights, MR_VertexMass vmass, float stabilizer, MR_PassBy vertStabilizers_pass_by, MR_std_function_float_from_MR_VertId *vertStabilizers, MR_PassBy edgeWeightsMetric_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *edgeWeightsMetric)
MRC_API void MR_InterpolateScalarsParams_Destroy(const MR_InterpolateScalarsParams *_this)
Destroys a heap-allocated instance of MR_InterpolateScalarsParams. Does nothing if the pointer is nul...
MRC_API MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_AssignFromAnother(MR_InterpolateScalarsParams *_this, MR_PassBy _other_pass_by, MR_InterpolateScalarsParams *_other)
MRC_API void MR_interpolateScalarsSmoothly_3_MR_Mesh(const MR_Mesh *mesh, MR_VertScalars *field, const MR_InterpolateScalarsParams *params)
struct MR_SpacingSettings MR_SpacingSettings
Definition MRPositionVertsSmoothly.h:34
MRC_API MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_AssignFromAnother(MR_PositionVertsSmoothlyParams *_this, MR_PassBy _other_pass_by, MR_PositionVertsSmoothlyParams *_other)
MRC_API const MR_std_function_float_from_MR_UndirectedEdgeId * MR_SpacingSettings_Get_dist(const MR_SpacingSettings *_this)
MRC_API void MR_inflate_3(MR_Mesh *mesh, const MR_VertBitSet *verts, const MR_InflateSettings *settings)
MRC_API void MR_interpolateScalarsSmoothly_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertScalars *field, const MR_InterpolateScalarsParams *params)
MRC_API void MR_InterpolateScalarsParams_Set_vmass(MR_InterpolateScalarsParams *_this, MR_VertexMass value)
MRC_API const MR_VertBitSet ** MR_PositionVertsSmoothlyParams_GetMutable_region(MR_PositionVertsSmoothlyParams *_this)
MRC_API void MR_PositionVertsSmoothlyParams_Set_vertShifts(MR_PositionVertsSmoothlyParams *_this, const MR_VertCoords *value)
MRC_API MR_std_function_float_from_MR_VertId * MR_PositionVertsSmoothlyParams_GetMutable_vertStabilizers(MR_PositionVertsSmoothlyParams *_this)
MRC_API void MR_SpacingSettings_Set_dist(MR_SpacingSettings *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *value)
MRC_API const MR_VertexMass * MR_InterpolateScalarsParams_Get_vmass(const MR_InterpolateScalarsParams *_this)
MRC_API MR_SpacingSettings * MR_SpacingSettings_ConstructFromAnother(MR_PassBy _other_pass_by, MR_SpacingSettings *_other)
MRC_API const bool * MR_InflateSettings_Get_preSmooth(const MR_InflateSettings *_this)
MRC_API MR_VertexMass * MR_InterpolateScalarsParams_GetMutable_vmass(MR_InterpolateScalarsParams *_this)
MRC_API void MR_positionVertsWithSpacing_2(MR_Mesh *mesh, const MR_SpacingSettings *settings)
MRC_API MR_SpacingSettings * MR_SpacingSettings_OffsetMutablePtr(MR_SpacingSettings *ptr, ptrdiff_t i)
MRC_API MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_PositionVertsSmoothlyParams *_other)
MRC_API MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_DefaultConstruct(void)
MRC_API void MR_InterpolateScalarsParams_Set_edgeWeights(MR_InterpolateScalarsParams *_this, MR_EdgeWeights value)
MRC_API void MR_PositionVertsSmoothlyParams_Set_stabilizer(MR_PositionVertsSmoothlyParams *_this, float value)
MRC_API void MR_inflate1(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *verts, float pressure)
MRC_API void MR_InflateSettings_DestroyArray(const MR_InflateSettings *_this)
Destroys a heap-allocated array of MR_InflateSettings. Does nothing if the pointer is null.
MRC_API const MR_InflateSettings * MR_InflateSettings_OffsetPtr(const MR_InflateSettings *ptr, ptrdiff_t i)
MRC_API void MR_PositionVertsSmoothlyParams_Set_edgeWeights(MR_PositionVertsSmoothlyParams *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *value)
MRC_API void MR_SpacingSettings_Set_numIters(MR_SpacingSettings *_this, int value)
MRC_API const float * MR_InflateSettings_Get_pressure(const MR_InflateSettings *_this)
MRC_API const float * MR_SpacingSettings_Get_stabilizer(const MR_SpacingSettings *_this)
MRC_API const MR_std_function_float_from_MR_VertId * MR_InterpolateScalarsParams_Get_vertStabilizers(const MR_InterpolateScalarsParams *_this)
MRC_API void MR_SpacingSettings_Set_region(MR_SpacingSettings *_this, const MR_VertBitSet *value)
MRC_API void MR_InflateSettings_Set_iterations(MR_InflateSettings *_this, int value)
MRC_API MR_EdgeWeights * MR_InterpolateScalarsParams_GetMutable_edgeWeights(MR_InterpolateScalarsParams *_this)
MRC_API const float * MR_PositionVertsSmoothlyParams_Get_stabilizer(const MR_PositionVertsSmoothlyParams *_this)
MRC_API void MR_SpacingSettings_Destroy(const MR_SpacingSettings *_this)
Destroys a heap-allocated instance of MR_SpacingSettings. Does nothing if the pointer is null.
MRC_API MR_std_function_float_from_MR_UndirectedEdgeId * MR_PositionVertsSmoothlyParams_GetMutable_edgeWeights(MR_PositionVertsSmoothlyParams *_this)
struct MR_InterpolateScalarsParams MR_InterpolateScalarsParams
Definition MRPositionVertsSmoothly.h:30
MRC_API MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_DefaultConstructArray(size_t num_elems)
MRC_API const int * MR_InflateSettings_Get_iterations(const MR_InflateSettings *_this)
MRC_API MR_InflateSettings * MR_InflateSettings_ConstructFromAnother(const MR_InflateSettings *_other)
MRC_API const MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_OffsetPtr(const MR_InterpolateScalarsParams *ptr, ptrdiff_t i)
MRC_API void MR_InterpolateScalarsParams_Set_stabilizer(MR_InterpolateScalarsParams *_this, float value)
MRC_API float * MR_PositionVertsSmoothlyParams_GetMutable_stabilizer(MR_PositionVertsSmoothlyParams *_this)
MRC_API MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_OffsetMutablePtr(MR_InterpolateScalarsParams *ptr, ptrdiff_t i)
MRC_API void MR_positionVertsSmoothly_6(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *verts, const MR_EdgeWeights *edgeWeights, const MR_VertexMass *vmass, const MR_VertBitSet *fixedSharpVertices)
MRC_API const MR_VertBitSet *const * MR_InterpolateScalarsParams_Get_region(const MR_InterpolateScalarsParams *_this)
MRC_API float * MR_InterpolateScalarsParams_GetMutable_stabilizer(MR_InterpolateScalarsParams *_this)
MRC_API float * MR_SpacingSettings_GetMutable_stabilizer(MR_SpacingSettings *_this)
MRC_API const MR_VertBitSet ** MR_SpacingSettings_GetMutable_region(MR_SpacingSettings *_this)
MRC_API void MR_positionVertsSmoothlySharpBd_3(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_PositionVertsSmoothlyParams *params)
MRC_API MR_std_function_bool_from_MR_FaceId * MR_SpacingSettings_GetMutable_isInverted(MR_SpacingSettings *_this)
MRC_API void MR_inflate_4(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_VertBitSet *verts, const MR_InflateSettings *settings)
MRC_API void MR_PositionVertsSmoothlyParams_Set_region(MR_PositionVertsSmoothlyParams *_this, const MR_VertBitSet *value)
MRC_API MR_std_function_float_from_MR_UndirectedEdgeId * MR_InterpolateScalarsParams_GetMutable_edgeWeightsMetric(MR_InterpolateScalarsParams *_this)
MRC_API MR_SpacingSettings * MR_SpacingSettings_DefaultConstruct(void)
MRC_API const MR_VertBitSet ** MR_InterpolateScalarsParams_GetMutable_region(MR_InterpolateScalarsParams *_this)
MRC_API const MR_std_function_float_from_MR_UndirectedEdgeId * MR_PositionVertsSmoothlyParams_Get_edgeWeights(const MR_PositionVertsSmoothlyParams *_this)
MRC_API void MR_InflateSettings_Destroy(const MR_InflateSettings *_this)
Destroys a heap-allocated instance of MR_InflateSettings. Does nothing if the pointer is null.
MRC_API const MR_VertBitSet *const * MR_SpacingSettings_Get_region(const MR_SpacingSettings *_this)
MRC_API float * MR_SpacingSettings_GetMutable_maxSumNegW(MR_SpacingSettings *_this)
MRC_API const MR_VertBitSet *const * MR_PositionVertsSmoothlyParams_Get_region(const MR_PositionVertsSmoothlyParams *_this)
MRC_API bool * MR_InflateSettings_GetMutable_preSmooth(MR_InflateSettings *_this)
MRC_API void MR_PositionVertsSmoothlyParams_Destroy(const MR_PositionVertsSmoothlyParams *_this)
Destroys a heap-allocated instance of MR_PositionVertsSmoothlyParams. Does nothing if the pointer is ...
MRC_API MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_ConstructFrom(const MR_VertBitSet *region, const MR_VertCoords *vertShifts, float stabilizer, MR_PassBy vertStabilizers_pass_by, MR_std_function_float_from_MR_VertId *vertStabilizers, MR_PassBy edgeWeights_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *edgeWeights)
struct MR_InflateSettings MR_InflateSettings
Definition MRPositionVertsSmoothly.h:38
MRC_API void MR_positionVertsSmoothlySharpBd_2_MR_PositionVertsSmoothlyParams(MR_Mesh *mesh, const MR_PositionVertsSmoothlyParams *params)
MRC_API void MR_PositionVertsSmoothlyParams_Set_vertStabilizers(MR_PositionVertsSmoothlyParams *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_VertId *value)
MRC_API void MR_positionVertsSmoothly_5(MR_Mesh *mesh, const MR_VertBitSet *verts, const MR_EdgeWeights *edgeWeights, const MR_VertexMass *vmass, const MR_VertBitSet *fixedSharpVertices)
MRC_API MR_InflateSettings * MR_InflateSettings_DefaultConstruct(void)
MRC_API const float * MR_SpacingSettings_Get_maxSumNegW(const MR_SpacingSettings *_this)
MRC_API void MR_SpacingSettings_Set_isInverted(MR_SpacingSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_MR_FaceId *value)
MRC_API void MR_InterpolateScalarsParams_Set_vertStabilizers(MR_InterpolateScalarsParams *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_VertId *value)
struct MR_std_function_float_from_MR_UndirectedEdgeId MR_std_function_float_from_MR_UndirectedEdgeId
Definition MRPositionVertsSmoothly.h:20
MRC_API MR_InflateSettings * MR_InflateSettings_AssignFromAnother(MR_InflateSettings *_this, const MR_InflateSettings *_other)
MRC_API void MR_InterpolateScalarsParams_Set_region(MR_InterpolateScalarsParams *_this, const MR_VertBitSet *value)
MRC_API MR_SpacingSettings * MR_SpacingSettings_DefaultConstructArray(size_t num_elems)
MRC_API MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_OffsetMutablePtr(MR_PositionVertsSmoothlyParams *ptr, ptrdiff_t i)
MRC_API const MR_std_function_float_from_MR_VertId * MR_PositionVertsSmoothlyParams_Get_vertStabilizers(const MR_PositionVertsSmoothlyParams *_this)
MRC_API void MR_interpolateScalarsSmoothly_3_MR_MeshTopology(const MR_MeshTopology *topology, MR_VertScalars *field, const MR_InterpolateScalarsParams *params)
MRC_API int * MR_InflateSettings_GetMutable_iterations(MR_InflateSettings *_this)
MRC_API MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_DefaultConstructArray(size_t num_elems)
MRC_API MR_SpacingSettings * MR_SpacingSettings_AssignFromAnother(MR_SpacingSettings *_this, MR_PassBy _other_pass_by, MR_SpacingSettings *_other)
MRC_DEPRECATED MRC_API void MR_positionVertsSmoothlySharpBd_2_MR_VertBitSet(MR_Mesh *mesh, const MR_VertBitSet *verts)
MRC_API const MR_EdgeWeights * MR_InterpolateScalarsParams_Get_edgeWeights(const MR_InterpolateScalarsParams *_this)
MRC_API void MR_InflateSettings_Set_preSmooth(MR_InflateSettings *_this, bool value)
MRC_API float * MR_InflateSettings_GetMutable_pressure(MR_InflateSettings *_this)
MRC_API MR_std_function_float_from_MR_UndirectedEdgeId * MR_SpacingSettings_GetMutable_dist(MR_SpacingSettings *_this)
MRC_API void MR_InterpolateScalarsParams_Set_edgeWeightsMetric(MR_InterpolateScalarsParams *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *value)
MRC_API const MR_VertCoords ** MR_PositionVertsSmoothlyParams_GetMutable_vertShifts(MR_PositionVertsSmoothlyParams *_this)
MRC_API MR_InterpolateScalarsParams * MR_InterpolateScalarsParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_InterpolateScalarsParams *_other)
MRC_API MR_SpacingSettings * MR_SpacingSettings_ConstructFrom(const MR_VertBitSet *region, MR_PassBy dist_pass_by, MR_std_function_float_from_MR_UndirectedEdgeId *dist, int numIters, float stabilizer, float maxSumNegW, MR_PassBy isInverted_pass_by, MR_std_function_bool_from_MR_FaceId *isInverted)
MRC_API void MR_InflateSettings_Set_pressure(MR_InflateSettings *_this, float value)
MRC_API const MR_PositionVertsSmoothlyParams * MR_PositionVertsSmoothlyParams_OffsetPtr(const MR_PositionVertsSmoothlyParams *ptr, ptrdiff_t i)
MRC_API void MR_SpacingSettings_DestroyArray(const MR_SpacingSettings *_this)
Destroys a heap-allocated array of MR_SpacingSettings. Does nothing if the pointer is null.
MRC_API void MR_positionVertsWithSpacing_3(const MR_MeshTopology *topology, MR_VertCoords *points, const MR_SpacingSettings *settings)
MRC_API const MR_std_function_float_from_MR_UndirectedEdgeId * MR_InterpolateScalarsParams_Get_edgeWeightsMetric(const MR_InterpolateScalarsParams *_this)
MRC_API MR_std_function_float_from_MR_VertId * MR_InterpolateScalarsParams_GetMutable_vertStabilizers(MR_InterpolateScalarsParams *_this)
MRC_API void MR_InterpolateScalarsParams_DestroyArray(const MR_InterpolateScalarsParams *_this)
Destroys a heap-allocated array of MR_InterpolateScalarsParams. Does nothing if the pointer is null.
MRC_API int * MR_SpacingSettings_GetMutable_numIters(MR_SpacingSettings *_this)
MRC_API bool * MR_InflateSettings_GetMutable_gradualPressureGrowth(MR_InflateSettings *_this)
#define MRC_DEPRECATED
Definition common.h:71
MR_PassBy
Definition common.h:13
#define MRC_API
Definition include/MRCMisc/exports.h:11