MeshLib C Docs
Loading...
Searching...
No Matches
MRAlphaShape.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9#include <stdint.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_ConvertToIntVector MR_ConvertToIntVector; // Defined in `#include <MRCMesh/MRPrecisePredicates3.h>`.
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17typedef struct MR_PointCloud MR_PointCloud; // Defined in `#include <MRCMesh/MRPointCloud.h>`.
18typedef struct MR_PreciseVertCoords MR_PreciseVertCoords; // Defined in `#include <MRCMesh/MRPrecisePredicates3.h>`.
19typedef struct MR_Triangulation MR_Triangulation; // Defined in `#include <MRCMesh/MRVector.h>`.
20typedef struct MR_Vector3f MR_Vector3f; // Defined in `#include <MRCMesh/MRVector3.h>`.
21typedef struct MR_Vector_MR_AlphaShapeNei MR_Vector_MR_AlphaShapeNei; // Defined in `#include <MRCMesh/MRVector.h>`.
22typedef struct MR_Vector_MR_BallPivotCandidate MR_Vector_MR_BallPivotCandidate; // Defined in `#include <MRCMesh/MRVector.h>`.
23typedef struct MR_Vector_MR_Vector3i_MR_VertId MR_Vector_MR_Vector3i_MR_VertId; // Defined in `#include <MRCMesh/MRVector.h>`.
24typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
25typedef struct MR_std_array_MR_VertId_3 MR_std_array_MR_VertId_3; // Defined in `#include <MRCMisc/std_array_MR_VertId_3.h>`.
26typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
27typedef struct MR_std_optional_MR_Mesh MR_std_optional_MR_Mesh; // Defined in `#include <MRCMisc/std_optional_MR_Mesh.h>`.
28typedef struct MR_std_optional_MR_Triangulation MR_std_optional_MR_Triangulation; // Defined in `#include <MRCMisc/std_optional_MR_Triangulation.h>`.
29typedef struct MR_std_optional_std_array_MR_VertId_3 MR_std_optional_std_array_MR_VertId_3; // Defined in `#include <MRCMisc/std_optional_std_array_MR_VertId_3.h>`.
30typedef struct MR_std_vector_MR_MeshBuilder_VertDuplication MR_std_vector_MR_MeshBuilder_VertDuplication; // Defined in `#include <MRCMisc/std_vector_MR_MeshBuilder_VertDuplication.h>`.
31
32
39
46
51
56
63
71
78
86
94
102
111
120
129
138
147
156
164
171
179
183
188
197MRC_API MR_AlphaShapeData *MR_AlphaShapeData_ConstructFrom(const MR_ConvertToIntVector *toInt, MR_PassBy intPoints_pass_by, MR_Vector_MR_Vector3i_MR_VertId *intPoints, MR_PassBy twins_pass_by, MR_VertBitSet *twins, int64_t intRadiusSq, float searchRadius);
198
202
206
211
214
217
224
229
237
244MRC_API MR_AlphaShapeData *MR_getAlphaShapeData(const MR_PointCloud *cloud, float radius, bool allPoints);
245
254
263
272
280
288
296
303
310
317
325
333
341
349
357
365
374
383
392
399
406
413
421
429
437
444
451
458
462
467
480MRC_API MR_AlphaShapeStats *MR_AlphaShapeStats_ConstructFrom(size_t collectedNeis, size_t redundancyTests, size_t redundantNeis, size_t consideredTris, size_t touchableTris, size_t inBallTests, size_t shadowTests, size_t exactShadowTests, size_t shadowedNeis);
481
485
489
495
498
501
509
516
523
531
538
542
547
551
555
561
564
567
575
588
595
603
610
618
625
633
637
642
649
653
657
663
666
669
677
694
702
708
718
725
736
743
757
770
785
795
801MRC_API MR_Mesh *MR_findBallPivotingMesh_4(const MR_PointCloud *cloud, float radius, const bool *allComponents, MR_std_vector_MR_MeshBuilder_VertDuplication *dups);
802
803#ifdef __cplusplus
804} // extern "C"
805#endif
struct MR_std_optional_MR_Mesh MR_std_optional_MR_Mesh
Definition MR2DContoursTriangulation.h:19
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:26
MRC_API void MR_AlphaShapeData_Set_intPoints(MR_AlphaShapeData *_this, MR_PassBy value_pass_by, MR_Vector_MR_Vector3i_MR_VertId *value)
MRC_API MR_std_optional_MR_Triangulation * MR_findAlphaShapeAllTriangles_4_MR_AlphaShapeData(const MR_PointCloud *cloud, const MR_AlphaShapeData *data, const MR_std_function_bool_from_float *cb, MR_AlphaShapeStats *stats)
MRC_API MR_AlphaShapeData * MR_AlphaShapeData_ConstructFromAnother(MR_PassBy _other_pass_by, MR_AlphaShapeData *_other)
MRC_API MR_BallPivotCandidate * MR_BallPivotCandidate_OffsetMutablePtr(MR_BallPivotCandidate *ptr, ptrdiff_t i)
MRC_API const int64_t * MR_AlphaShapeData_Get_intRadiusSq(const MR_AlphaShapeData *_this)
MRC_API void MR_BallPivotCandidate_DestroyArray(const MR_BallPivotCandidate *_this)
Destroys a heap-allocated array of MR_BallPivotCandidate. Does nothing if the pointer is null.
struct MR_ConvertToIntVector MR_ConvertToIntVector
Definition MRAlphaShape.h:15
MRC_API void MR_AlphaShapeNei_DestroyArray(const MR_AlphaShapeNei *_this)
Destroys a heap-allocated array of MR_AlphaShapeNei. Does nothing if the pointer is null.
MRC_API const MR_PreciseVertCoords * MR_AlphaShapeNei_Get_coords(const MR_AlphaShapeNei *_this)
MRC_API bool * MR_BallPivotCandidate_GetMutable_cwFromVk(MR_BallPivotCandidate *_this)
struct MR_AlphaShapeData MR_AlphaShapeData
Definition MRAlphaShape.h:38
MRC_API size_t * MR_AlphaShapeStats_GetMutable_inBallTests(MR_AlphaShapeStats *_this)
struct MR_Vector_MR_Vector3i_MR_VertId MR_Vector_MR_Vector3i_MR_VertId
Definition MRAlphaShape.h:23
MRC_API MR_AlphaShapeData * MR_AlphaShapeData_ConstructFrom(const MR_ConvertToIntVector *toInt, MR_PassBy intPoints_pass_by, MR_Vector_MR_Vector3i_MR_VertId *intPoints, MR_PassBy twins_pass_by, MR_VertBitSet *twins, int64_t intRadiusSq, float searchRadius)
MRC_API void MR_AlphaShapeData_Set_intRadiusSq(MR_AlphaShapeData *_this, int64_t value)
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_OffsetMutablePtr(MR_AlphaShapeStats *ptr, ptrdiff_t i)
MRC_API const size_t * MR_AlphaShapeStats_Get_redundancyTests(const MR_AlphaShapeStats *_this)
MRC_API MR_std_optional_MR_Mesh * MR_findAlphaShape_5(const MR_PointCloud *cloud, float radius, const MR_std_function_bool_from_float *cb, MR_std_vector_MR_MeshBuilder_VertDuplication *dups, MR_AlphaShapeStats *stats)
MRC_API MR_BallPivotCandidate * MR_BallPivotCandidate_ConstructFromAnother(const MR_BallPivotCandidate *_other)
MRC_API void MR_AlphaShapeStats_Set_redundantNeis(MR_AlphaShapeStats *_this, size_t value)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_redundantNeis(MR_AlphaShapeStats *_this)
MRC_API MR_VertBitSet * MR_AlphaShapeData_GetMutable_twins(MR_AlphaShapeData *_this)
struct MR_BallPivotCandidate MR_BallPivotCandidate
Definition MRAlphaShape.h:55
MRC_API const size_t * MR_AlphaShapeStats_Get_consideredTris(const MR_AlphaShapeStats *_this)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_exactShadowTests(MR_AlphaShapeStats *_this)
MRC_API MR_Mesh * MR_findAlphaShape_4(const MR_PointCloud *cloud, float radius, MR_std_vector_MR_MeshBuilder_VertDuplication *dups, MR_AlphaShapeStats *stats)
MRC_API const bool * MR_BallPivotCandidate_Get_cwFromVk(const MR_BallPivotCandidate *_this)
MRC_API MR_Mesh * MR_findBallPivotingMesh_4(const MR_PointCloud *cloud, float radius, const bool *allComponents, MR_std_vector_MR_MeshBuilder_VertDuplication *dups)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_touchableTris(MR_AlphaShapeStats *_this)
struct MR_Triangulation MR_Triangulation
Definition MRAlphaShape.h:19
MRC_API size_t * MR_AlphaShapeStats_GetMutable_redundancyTests(MR_AlphaShapeStats *_this)
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_ConstructFromAnother(const MR_AlphaShapeStats *_other)
MRC_API MR_Triangulation * MR_findAlphaShapeAllTriangles_3_MR_AlphaShapeData(const MR_PointCloud *cloud, const MR_AlphaShapeData *data, MR_AlphaShapeStats *stats)
MRC_API void MR_AlphaShapeStats_Set_consideredTris(MR_AlphaShapeStats *_this, size_t value)
MRC_API void MR_AlphaShapeData_Set_searchRadius(MR_AlphaShapeData *_this, float value)
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_add_assign(MR_AlphaShapeStats *_this, const MR_AlphaShapeStats *r)
MRC_API const size_t * MR_AlphaShapeStats_Get_inBallTests(const MR_AlphaShapeStats *_this)
MRC_API void MR_AlphaShapeNei_Set_coords(MR_AlphaShapeNei *_this, const MR_PreciseVertCoords *value)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_shadowTests(MR_AlphaShapeStats *_this)
MRC_API MR_AlphaShapeNei * MR_AlphaShapeNei_DefaultConstruct(void)
MRC_API MR_std_optional_MR_Triangulation * MR_findBallPivotingComponent(const MR_PointCloud *cloud, const MR_std_array_MR_VertId_3 *seed, const MR_AlphaShapeData *data, const MR_std_function_bool_from_float *cb)
struct MR_std_vector_MR_MeshBuilder_VertDuplication MR_std_vector_MR_MeshBuilder_VertDuplication
Definition MRAlphaShape.h:30
MRC_API const MR_VertBitSet * MR_AlphaShapeData_Get_twins(const MR_AlphaShapeData *_this)
MRC_API MR_AlphaShapeNei * MR_AlphaShapeNei_OffsetMutablePtr(MR_AlphaShapeNei *ptr, ptrdiff_t i)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_consideredTris(MR_AlphaShapeStats *_this)
MRC_API void MR_AlphaShapeStats_Set_inBallTests(MR_AlphaShapeStats *_this, size_t value)
MRC_API float * MR_AlphaShapeData_GetMutable_searchRadius(MR_AlphaShapeData *_this)
struct MR_AlphaShapeNei MR_AlphaShapeNei
Definition MRAlphaShape.h:50
MRC_API MR_std_optional_MR_Triangulation * MR_findBallPivotingTriangles(const MR_PointCloud *cloud, const MR_AlphaShapeData *data, const bool *allComponents, const MR_std_function_bool_from_float *cb)
MRC_API MR_BallPivotCandidate * MR_BallPivotCandidate_DefaultConstruct(void)
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_DefaultConstructArray(size_t num_elems)
MRC_API MR_AlphaShapeNei * MR_AlphaShapeNei_AssignFromAnother(MR_AlphaShapeNei *_this, const MR_AlphaShapeNei *_other)
MRC_API MR_Triangulation * MR_findAlphaShapeAllTriangles_3_float(const MR_PointCloud *cloud, float radius, MR_AlphaShapeStats *stats)
MRC_API void MR_AlphaShapeData_DestroyArray(const MR_AlphaShapeData *_this)
Destroys a heap-allocated array of MR_AlphaShapeData. Does nothing if the pointer is null.
MRC_API const size_t * MR_AlphaShapeStats_Get_redundantNeis(const MR_AlphaShapeStats *_this)
MRC_API MR_PreciseVertCoords * MR_AlphaShapeData_coords(const MR_AlphaShapeData *_this, const MR_PointCloud *cloud, MR_VertId v)
MRC_API MR_BallPivotCandidate * MR_BallPivotCandidate_DefaultConstructArray(size_t num_elems)
MRC_API void MR_AlphaShapeData_Set_toInt(MR_AlphaShapeData *_this, const MR_ConvertToIntVector *value)
MRC_API const size_t * MR_AlphaShapeStats_Get_shadowTests(const MR_AlphaShapeStats *_this)
MRC_API const MR_ConvertToIntVector * MR_AlphaShapeData_Get_toInt(const MR_AlphaShapeData *_this)
MRC_API void MR_findAlphaShapeNeiTriangles(const MR_PointCloud *cloud, MR_VertId v, const MR_AlphaShapeData *data, MR_Triangulation *appendTris, MR_Vector_MR_AlphaShapeNei *neis, bool onlyLargerVids, MR_AlphaShapeStats *stats)
MRC_API void MR_AlphaShapeStats_Set_collectedNeis(MR_AlphaShapeStats *_this, size_t value)
MRC_API void MR_AlphaShapeStats_Destroy(const MR_AlphaShapeStats *_this)
Destroys a heap-allocated instance of MR_AlphaShapeStats. Does nothing if the pointer is null.
MRC_API void MR_BallPivotCandidate_Set_cwFromVk(MR_BallPivotCandidate *_this, bool value)
MRC_API const MR_BallPivotCandidate * MR_BallPivotCandidate_OffsetPtr(const MR_BallPivotCandidate *ptr, ptrdiff_t i)
MRC_API MR_AlphaShapeData * MR_getAlphaShapeData(const MR_PointCloud *cloud, float radius, bool allPoints)
struct MR_Vector_MR_BallPivotCandidate MR_Vector_MR_BallPivotCandidate
Definition MRAlphaShape.h:22
MRC_API void MR_BallPivotCandidate_Destroy(const MR_BallPivotCandidate *_this)
Destroys a heap-allocated instance of MR_BallPivotCandidate. Does nothing if the pointer is null.
MRC_API const MR_Vector_MR_Vector3i_MR_VertId * MR_AlphaShapeData_Get_intPoints(const MR_AlphaShapeData *_this)
MRC_API void MR_AlphaShapeData_Set_twins(MR_AlphaShapeData *_this, MR_PassBy value_pass_by, MR_VertBitSet *value)
MRC_API MR_ConvertToIntVector * MR_AlphaShapeData_GetMutable_toInt(MR_AlphaShapeData *_this)
struct MR_std_optional_MR_Triangulation MR_std_optional_MR_Triangulation
Definition MRAlphaShape.h:28
MRC_API MR_PreciseVertCoords * MR_BallPivotCandidate_GetMutable_coords(MR_BallPivotCandidate *_this)
MRC_API void MR_AlphaShapeData_Destroy(const MR_AlphaShapeData *_this)
Destroys a heap-allocated instance of MR_AlphaShapeData. Does nothing if the pointer is null.
MRC_API MR_BallPivotCandidate * MR_BallPivotCandidate_AssignFromAnother(MR_BallPivotCandidate *_this, const MR_BallPivotCandidate *_other)
MRC_API MR_VertId MR_findBallPivotVertex(const MR_PointCloud *cloud, MR_VertId vi, MR_VertId vj, MR_VertId vk, const MR_AlphaShapeData *data, MR_Vector_MR_BallPivotCandidate *cands)
MRC_API const MR_AlphaShapeNei * MR_AlphaShapeNei_OffsetPtr(const MR_AlphaShapeNei *ptr, ptrdiff_t i)
MRC_API MR_AlphaShapeNei * MR_AlphaShapeNei_DefaultConstructArray(size_t num_elems)
MRC_API MR_std_optional_std_array_MR_VertId_3 * MR_findBallPivotingSeed(const MR_PointCloud *cloud, MR_VertId v, const MR_Vector3f *dir, const MR_AlphaShapeData *data, MR_Triangulation *tris, MR_Vector_MR_AlphaShapeNei *neis)
MRC_API MR_BallPivotCandidate * MR_BallPivotCandidate_ConstructFrom(const MR_PreciseVertCoords *coords, bool cwFromVk)
MRC_API const size_t * MR_AlphaShapeStats_Get_collectedNeis(const MR_AlphaShapeStats *_this)
MRC_API const size_t * MR_AlphaShapeStats_Get_shadowedNeis(const MR_AlphaShapeStats *_this)
MRC_API void MR_AlphaShapeStats_Set_exactShadowTests(MR_AlphaShapeStats *_this, size_t value)
MRC_API bool MR_AlphaShapeData_knowsTwins(const MR_AlphaShapeData *_this)
MRC_API void MR_AlphaShapeStats_Set_touchableTris(MR_AlphaShapeStats *_this, size_t value)
MRC_API const float * MR_AlphaShapeData_Get_searchRadius(const MR_AlphaShapeData *_this)
MRC_API const size_t * MR_AlphaShapeStats_Get_exactShadowTests(const MR_AlphaShapeStats *_this)
struct MR_PreciseVertCoords MR_PreciseVertCoords
Definition MRAlphaShape.h:18
MRC_API MR_AlphaShapeNei * MR_AlphaShapeNei_ConstructFromAnother(const MR_AlphaShapeNei *_other)
MRC_API const MR_PreciseVertCoords * MR_BallPivotCandidate_Get_coords(const MR_BallPivotCandidate *_this)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_shadowedNeis(MR_AlphaShapeStats *_this)
MRC_API void MR_AlphaShapeStats_Set_shadowTests(MR_AlphaShapeStats *_this, size_t value)
struct MR_std_optional_std_array_MR_VertId_3 MR_std_optional_std_array_MR_VertId_3
Definition MRAlphaShape.h:29
MRC_API MR_Vector_MR_Vector3i_MR_VertId * MR_AlphaShapeData_GetMutable_intPoints(MR_AlphaShapeData *_this)
MRC_API void MR_AlphaShapeStats_Set_shadowedNeis(MR_AlphaShapeStats *_this, size_t value)
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_AssignFromAnother(MR_AlphaShapeStats *_this, const MR_AlphaShapeStats *_other)
MRC_API const MR_AlphaShapeStats * MR_AlphaShapeStats_OffsetPtr(const MR_AlphaShapeStats *ptr, ptrdiff_t i)
MRC_API const size_t * MR_AlphaShapeStats_Get_touchableTris(const MR_AlphaShapeStats *_this)
struct MR_AlphaShapeStats MR_AlphaShapeStats
Definition MRAlphaShape.h:45
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_ConstructFrom(size_t collectedNeis, size_t redundancyTests, size_t redundantNeis, size_t consideredTris, size_t touchableTris, size_t inBallTests, size_t shadowTests, size_t exactShadowTests, size_t shadowedNeis)
MRC_API void MR_AlphaShapeNei_Destroy(const MR_AlphaShapeNei *_this)
Destroys a heap-allocated instance of MR_AlphaShapeNei. Does nothing if the pointer is null.
MRC_API MR_std_optional_MR_Mesh * MR_findBallPivotingMesh_5(const MR_PointCloud *cloud, float radius, bool allComponents, const MR_std_function_bool_from_float *cb, MR_std_vector_MR_MeshBuilder_VertDuplication *dups)
MRC_API MR_AlphaShapeData * MR_AlphaShapeData_DefaultConstruct(void)
MRC_API void MR_AlphaShapeStats_Set_redundancyTests(MR_AlphaShapeStats *_this, size_t value)
MRC_API MR_std_optional_MR_Triangulation * MR_findAlphaShapeAllTriangles_4_float(const MR_PointCloud *cloud, float radius, const MR_std_function_bool_from_float *cb, MR_AlphaShapeStats *stats)
MRC_API const MR_AlphaShapeData * MR_AlphaShapeData_OffsetPtr(const MR_AlphaShapeData *ptr, ptrdiff_t i)
MRC_API void MR_BallPivotCandidate_Set_coords(MR_BallPivotCandidate *_this, const MR_PreciseVertCoords *value)
MRC_API size_t * MR_AlphaShapeStats_GetMutable_collectedNeis(MR_AlphaShapeStats *_this)
MRC_API MR_AlphaShapeStats * MR_AlphaShapeStats_DefaultConstruct(void)
MRC_API MR_PreciseVertCoords * MR_AlphaShapeNei_GetMutable_coords(MR_AlphaShapeNei *_this)
MRC_API MR_AlphaShapeData * MR_AlphaShapeData_AssignFromAnother(MR_AlphaShapeData *_this, MR_PassBy _other_pass_by, MR_AlphaShapeData *_other)
struct MR_Vector_MR_AlphaShapeNei MR_Vector_MR_AlphaShapeNei
Definition MRAlphaShape.h:21
MRC_API int64_t * MR_AlphaShapeData_GetMutable_intRadiusSq(MR_AlphaShapeData *_this)
MRC_API MR_AlphaShapeData * MR_AlphaShapeData_DefaultConstructArray(size_t num_elems)
MRC_API MR_AlphaShapeData * MR_AlphaShapeData_OffsetMutablePtr(MR_AlphaShapeData *ptr, ptrdiff_t i)
MRC_API void MR_AlphaShapeStats_DestroyArray(const MR_AlphaShapeStats *_this)
Destroys a heap-allocated array of MR_AlphaShapeStats. Does nothing if the pointer is null.
struct MR_Mesh MR_Mesh
Definition MRCtm.h:17
struct MR_PointCloud MR_PointCloud
Definition MRCtm.h:20
MR_PassBy
Definition common.h:13
#define MRC_API
Definition include/MRCMisc/exports.h:11
Generated from class MR::Vector3f.
Definition MRVector3.h:47
Definition MRId.h:41
A fixed-size array of MR::VertId of size 3.
Definition std_array_MR_VertId_3.h:12