MeshLib C Docs
Loading...
Searching...
No Matches
MRUniteManyMeshes.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.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_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
15typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
16typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
17typedef struct MR_std_vector_const_MR_Mesh_ptr MR_std_vector_const_MR_Mesh_ptr; // Defined in `#include <MRCMisc/std_vector_const_MR_Mesh_ptr.h>`.
18
19
22enum // MR_NestedComponenetsMode
23{
30};
31
35
41
46
52
60
67
75
82
88
95
101
106
112
118
123
129
136
142
149
155
160
166
174
181
189
194
198
203
207
212
215MRC_API MR_UniteManyMeshesParams *MR_UniteManyMeshesParams_ConstructFrom(bool useRandomShifts, bool fixDegenerations, float maxAllowedError, uint32_t randomShiftsSeed, MR_FaceBitSet *newFaces, MR_NestedComponenetsMode nestedComponentsMode, bool mergeOnFail, bool forceCut, MR_PassBy progressCb_pass_by, MR_std_function_bool_from_float *progressCb);
216
219
222
226
229
232
237
238// Computes the surface of objects' union each of which is defined by its own surface mesh
239// - merge non intersecting meshes first
240// - unite merged groups
247
248#ifdef __cplusplus
249} // extern "C"
250#endif
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_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
Definition MRCtm.h:18
MRC_API const float * MR_UniteManyMeshesParams_Get_maxAllowedError(const MR_UniteManyMeshesParams *_this)
MRC_API bool * MR_UniteManyMeshesParams_GetMutable_fixDegenerations(MR_UniteManyMeshesParams *_this)
MRC_API const MR_std_function_bool_from_float * MR_UniteManyMeshesParams_Get_progressCb(const MR_UniteManyMeshesParams *_this)
MRC_API void MR_UniteManyMeshesParams_Set_forceCut(MR_UniteManyMeshesParams *_this, bool value)
MRC_API bool * MR_UniteManyMeshesParams_GetMutable_useRandomShifts(MR_UniteManyMeshesParams *_this)
MRC_API MR_UniteManyMeshesParams * MR_UniteManyMeshesParams_AssignFromAnother(MR_UniteManyMeshesParams *_this, MR_PassBy _other_pass_by, MR_UniteManyMeshesParams *_other)
MRC_API MR_UniteManyMeshesParams * MR_UniteManyMeshesParams_OffsetMutablePtr(MR_UniteManyMeshesParams *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_UniteManyMeshesParams_Set_randomShiftsSeed(MR_UniteManyMeshesParams *_this, uint32_t value)
MRC_API const uint32_t * MR_UniteManyMeshesParams_Get_randomShiftsSeed(const MR_UniteManyMeshesParams *_this)
MRC_API MR_UniteManyMeshesParams * MR_UniteManyMeshesParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_UniteManyMeshesParams *_other)
MRC_API const bool * MR_UniteManyMeshesParams_Get_mergeOnFail(const MR_UniteManyMeshesParams *_this)
MRC_API bool * MR_UniteManyMeshesParams_GetMutable_mergeOnFail(MR_UniteManyMeshesParams *_this)
MRC_API bool * MR_UniteManyMeshesParams_GetMutable_forceCut(MR_UniteManyMeshesParams *_this)
MRC_API void MR_UniteManyMeshesParams_Set_fixDegenerations(MR_UniteManyMeshesParams *_this, bool value)
MRC_API void MR_UniteManyMeshesParams_Set_nestedComponentsMode(MR_UniteManyMeshesParams *_this, MR_NestedComponenetsMode value)
struct MR_UniteManyMeshesParams MR_UniteManyMeshesParams
Definition MRUniteManyMeshes.h:34
MRC_API const bool * MR_UniteManyMeshesParams_Get_forceCut(const MR_UniteManyMeshesParams *_this)
MRC_API void MR_UniteManyMeshesParams_Set_useRandomShifts(MR_UniteManyMeshesParams *_this, bool value)
MRC_API const bool * MR_UniteManyMeshesParams_Get_useRandomShifts(const MR_UniteManyMeshesParams *_this)
MRC_API void MR_UniteManyMeshesParams_Set_mergeOnFail(MR_UniteManyMeshesParams *_this, bool value)
MRC_API void MR_UniteManyMeshesParams_Set_progressCb(MR_UniteManyMeshesParams *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
MRC_API MR_FaceBitSet ** MR_UniteManyMeshesParams_GetMutable_newFaces(MR_UniteManyMeshesParams *_this)
MRC_API float * MR_UniteManyMeshesParams_GetMutable_maxAllowedError(MR_UniteManyMeshesParams *_this)
MRC_API MR_std_function_bool_from_float * MR_UniteManyMeshesParams_GetMutable_progressCb(MR_UniteManyMeshesParams *_this)
MRC_API const MR_UniteManyMeshesParams * MR_UniteManyMeshesParams_OffsetPtr(const MR_UniteManyMeshesParams *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_UniteManyMeshesParams * MR_UniteManyMeshesParams_DefaultConstructArray(size_t num_elems)
MRC_API uint32_t * MR_UniteManyMeshesParams_GetMutable_randomShiftsSeed(MR_UniteManyMeshesParams *_this)
MRC_API void MR_UniteManyMeshesParams_Set_maxAllowedError(MR_UniteManyMeshesParams *_this, float value)
MRC_API MR_NestedComponenetsMode * MR_UniteManyMeshesParams_GetMutable_nestedComponentsMode(MR_UniteManyMeshesParams *_this)
MRC_API const bool * MR_UniteManyMeshesParams_Get_fixDegenerations(const MR_UniteManyMeshesParams *_this)
int32_t MR_NestedComponenetsMode
Mode of processing components.
Definition MRUniteManyMeshes.h:21
MRC_API void MR_UniteManyMeshesParams_Destroy(const MR_UniteManyMeshesParams *_this)
Destroys a heap-allocated instance of MR_UniteManyMeshesParams. Does nothing if the pointer is null.
@ MR_NestedComponenetsMode_Remove
Default: separate nested meshes and remove them, just like union operation should do,...
Definition MRUniteManyMeshes.h:25
@ MR_NestedComponenetsMode_Merge
does not separate components and call union for all input meshes, works slower than Remove and Merge ...
Definition MRUniteManyMeshes.h:27
@ MR_NestedComponenetsMode_Union
Definition MRUniteManyMeshes.h:29
MRC_API const MR_NestedComponenetsMode * MR_UniteManyMeshesParams_Get_nestedComponentsMode(const MR_UniteManyMeshesParams *_this)
struct MR_std_vector_const_MR_Mesh_ptr MR_std_vector_const_MR_Mesh_ptr
Definition MRUniteManyMeshes.h:17
MRC_API MR_UniteManyMeshesParams * MR_UniteManyMeshesParams_DefaultConstruct(void)
MRC_API void MR_UniteManyMeshesParams_DestroyArray(const MR_UniteManyMeshesParams *_this)
Destroys a heap-allocated array of MR_UniteManyMeshesParams. Does nothing if the pointer is null.
MRC_API MR_expected_MR_Mesh_std_string * MR_uniteManyMeshes(const MR_std_vector_const_MR_Mesh_ptr *meshes, const MR_UniteManyMeshesParams *params)
MRC_API MR_FaceBitSet *const * MR_UniteManyMeshesParams_Get_newFaces(const MR_UniteManyMeshesParams *_this)
MRC_API MR_UniteManyMeshesParams * MR_UniteManyMeshesParams_ConstructFrom(bool useRandomShifts, bool fixDegenerations, float maxAllowedError, uint32_t randomShiftsSeed, MR_FaceBitSet *newFaces, MR_NestedComponenetsMode nestedComponentsMode, bool mergeOnFail, bool forceCut, MR_PassBy progressCb_pass_by, MR_std_function_bool_from_float *progressCb)
MRC_API void MR_UniteManyMeshesParams_Set_newFaces(MR_UniteManyMeshesParams *_this, MR_FaceBitSet *value)
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11