MeshLib C Docs
Loading...
Searching...
No Matches
MR2DContoursTriangulation.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
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_std_optional_MR_Mesh MR_std_optional_MR_Mesh; // Defined in `#include <MRCMisc/std_optional_MR_Mesh.h>`.
17typedef struct MR_std_vector_MR_PlanarTriangulation_IntersectionInfo MR_std_vector_MR_PlanarTriangulation_IntersectionInfo; // Defined in `#include <MRCMisc/std_vector_MR_PlanarTriangulation_IntersectionInfo.h>`.
18typedef struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_EdgeId.h>`.
19typedef struct MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo.h>`.
20typedef struct MR_std_vector_std_vector_MR_Vector2d MR_std_vector_std_vector_MR_Vector2d; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_Vector2d.h>`.
21typedef struct MR_std_vector_std_vector_MR_Vector2f MR_std_vector_std_vector_MR_Vector2f; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_Vector2f.h>`.
22typedef struct MR_std_vector_std_vector_MR_VertId MR_std_vector_std_vector_MR_VertId; // Defined in `#include <MRCMisc/std_vector_std_vector_MR_VertId.h>`.
23
24
32
37
42
46
50
57
64
70
77
84
90
97
103
108
114
120
125
131
132// ratio of intersection
133// 0.0 -> point is lOrg
134// 1.0 -> point is lDest
139
140// ratio of intersection
141// 0.0 -> point is lOrg
142// 1.0 -> point is lDest
146
147// ratio of intersection
148// 0.0 -> point is lOrg
149// 1.0 -> point is lDest
154
155// 0.0 -> point is uOrg
156// 1.0 -> point is uDest
161
162// 0.0 -> point is uOrg
163// 1.0 -> point is uDest
167
168// 0.0 -> point is uOrg
169// 1.0 -> point is uDest
174
178
183
187
190
193
198
201
204
210
214
220
225
231
237
242
248
252
257
261
264
267
271
274
277
282
288
293
299
305
310
316
320
325
329
332
335
340
343
346
352
362
370
376
381
387
392
397
402
406
411
416
419
422
427
430
433
439
447
454
466
472
486
493
494#ifdef __cplusplus
495} // extern "C"
496#endif
MRC_API MR_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_OffsetMutablePtr(MR_PlanarTriangulation_IntersectionsMap *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_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_ConstructFrom(MR_uint64_t shift, MR_PassBy map_pass_by, MR_std_vector_MR_PlanarTriangulation_IntersectionInfo *map)
MRC_API void MR_PlanarTriangulation_OutlineParameters_DestroyArray(const MR_PlanarTriangulation_OutlineParameters *_this)
Destroys a heap-allocated array of MR_PlanarTriangulation_OutlineParameters. Does nothing if the poin...
MRC_API const MR_VertId * MR_PlanarTriangulation_IntersectionInfo_Get_lOrg(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API const MR_VertId * MR_PlanarTriangulation_IntersectionInfo_Get_uOrg(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_std_vector_std_vector_MR_Vector2f * MR_PlanarTriangulation_getOutline_std_vector_std_vector_MR_Vector2f(const MR_std_vector_std_vector_MR_Vector2f *contours, const MR_PlanarTriangulation_OutlineParameters *params)
MRC_API MR_VertId * MR_PlanarTriangulation_IntersectionInfo_GetMutable_uDest(MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_DefaultConstruct(void)
MRC_API void MR_PlanarTriangulation_IntersectionsMap_Set_map(MR_PlanarTriangulation_IntersectionsMap *_this, MR_PassBy value_pass_by, MR_std_vector_MR_PlanarTriangulation_IntersectionInfo *value)
struct MR_PlanarTriangulation_OutlineParameters MR_PlanarTriangulation_OutlineParameters
Definition MR2DContoursTriangulation.h:49
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Set_lOrg(MR_PlanarTriangulation_IntersectionInfo *_this, MR_VertId value)
MRC_API const MR_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_OffsetPtr(const MR_PlanarTriangulation_IntersectionsMap *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_PlanarTriangulation_IntersectionsMap_DestroyArray(const MR_PlanarTriangulation_IntersectionsMap *_this)
Destroys a heap-allocated array of MR_PlanarTriangulation_IntersectionsMap. Does nothing if the point...
MRC_API MR_VertId * MR_PlanarTriangulation_IntersectionInfo_GetMutable_lOrg(MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_OffsetMutablePtr(MR_PlanarTriangulation_BaseOutlineParameters *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_std_optional_MR_Mesh MR_std_optional_MR_Mesh
Definition MR2DContoursTriangulation.h:16
MRC_API float * MR_PlanarTriangulation_IntersectionInfo_GetMutable_lRatio(MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API void MR_PlanarTriangulation_BaseOutlineParameters_Set_innerType(MR_PlanarTriangulation_BaseOutlineParameters *_this, MR_PlanarTriangulation_WindingMode value)
MR_PlanarTriangulation_WindingMode
Specify mode of detecting inside and outside parts of triangulation.
Definition MR2DContoursTriangulation.h:27
@ MR_PlanarTriangulation_WindingMode_NonZero
Definition MR2DContoursTriangulation.h:28
@ MR_PlanarTriangulation_WindingMode_Positive
Definition MR2DContoursTriangulation.h:29
@ MR_PlanarTriangulation_WindingMode_Negative
Definition MR2DContoursTriangulation.h:30
MRC_API MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_DefaultConstructArray(size_t num_elems)
MRC_API bool MR_PlanarTriangulation_IntersectionInfo_isIntersection(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_std_optional_MR_Mesh * MR_PlanarTriangulation_triangulateDisjointContours_std_vector_std_vector_MR_Vector2d(const MR_std_vector_std_vector_MR_Vector2d *contours, const MR_std_vector_std_vector_MR_VertId *holeVertsIds, MR_std_vector_std_vector_MR_EdgeId *outBoundaries)
triangulate 2d contours only closed contours are allowed (first point of each contour should be the s...
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Set_lDest(MR_PlanarTriangulation_IntersectionInfo *_this, MR_VertId value)
MRC_API MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_DefaultConstruct(void)
MRC_API float * MR_PlanarTriangulation_IntersectionInfo_GetMutable_uRatio(MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_Mesh * MR_PlanarTriangulation_triangulateContours_std_vector_std_vector_MR_Vector2d(const MR_std_vector_std_vector_MR_Vector2d *contours, const MR_std_vector_std_vector_MR_VertId *holeVertsIds)
triangulate 2d contours only closed contours are allowed (first point of each contour should be the s...
MRC_API MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_ConstructFrom(bool allowMerge, MR_PlanarTriangulation_WindingMode innerType)
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Set_uOrg(MR_PlanarTriangulation_IntersectionInfo *_this, MR_VertId value)
struct MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo
Definition MR2DContoursTriangulation.h:19
MRC_API MR_uint64_t * MR_PlanarTriangulation_IntersectionsMap_GetMutable_shift(MR_PlanarTriangulation_IntersectionsMap *_this)
struct MR_std_vector_std_vector_MR_Vector2f MR_std_vector_std_vector_MR_Vector2f
Definition MR2DContoursTriangulation.h:21
MRC_API MR_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_ConstructFromAnother(const MR_PlanarTriangulation_OutlineParameters *_other)
MRC_API MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_ConstructFrom(MR_VertId lOrg, MR_VertId lDest, MR_VertId uOrg, MR_VertId uDest, float lRatio, float uRatio)
MRC_API MR_std_vector_MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionsMap_GetMutable_map(MR_PlanarTriangulation_IntersectionsMap *_this)
MRC_API MR_std_optional_MR_Mesh * MR_PlanarTriangulation_triangulateDisjointContours_std_vector_std_vector_MR_Vector2f(const MR_std_vector_std_vector_MR_Vector2f *contours, const MR_std_vector_std_vector_MR_VertId *holeVertsIds, MR_std_vector_std_vector_MR_EdgeId *outBoundaries)
MRC_API const MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_OffsetPtr(const MR_PlanarTriangulation_IntersectionInfo *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_VertId * MR_PlanarTriangulation_IntersectionInfo_Get_lDest(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API void MR_PlanarTriangulation_BaseOutlineParameters_Destroy(const MR_PlanarTriangulation_BaseOutlineParameters *_this)
Destroys a heap-allocated instance of MR_PlanarTriangulation_BaseOutlineParameters....
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Destroy(const MR_PlanarTriangulation_IntersectionInfo *_this)
Destroys a heap-allocated instance of MR_PlanarTriangulation_IntersectionInfo. Does nothing if the po...
MRC_API MR_VertId * MR_PlanarTriangulation_IntersectionInfo_GetMutable_lDest(MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_Mesh * MR_PlanarTriangulation_triangulateContours_std_vector_std_vector_MR_Vector2f(const MR_std_vector_std_vector_MR_Vector2f *contours, const MR_std_vector_std_vector_MR_VertId *holeVertsIds)
MRC_API void MR_PlanarTriangulation_IntersectionsMap_Destroy(const MR_PlanarTriangulation_IntersectionsMap *_this)
Destroys a heap-allocated instance of MR_PlanarTriangulation_IntersectionsMap. Does nothing if the po...
struct MR_PlanarTriangulation_IntersectionInfo MR_PlanarTriangulation_IntersectionInfo
Definition MR2DContoursTriangulation.h:36
struct MR_PlanarTriangulation_BaseOutlineParameters MR_PlanarTriangulation_BaseOutlineParameters
Definition MR2DContoursTriangulation.h:45
MRC_API MR_Mesh * MR_PlanarTriangulation_getOutlineMesh_std_vector_std_vector_MR_Vector2d(const MR_std_vector_std_vector_MR_Vector2d *contours, MR_PlanarTriangulation_IntersectionsMap *interMap, const MR_PlanarTriangulation_BaseOutlineParameters *params)
MRC_API MR_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_AssignFromAnother(MR_PlanarTriangulation_OutlineParameters *_this, const MR_PlanarTriangulation_OutlineParameters *_other)
MRC_API MR_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_DefaultConstruct(void)
MRC_API const MR_std_vector_MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionsMap_Get_map(const MR_PlanarTriangulation_IntersectionsMap *_this)
MRC_API const float * MR_PlanarTriangulation_IntersectionInfo_Get_uRatio(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_ConstructFromAnother(MR_PassBy _other_pass_by, MR_PlanarTriangulation_IntersectionsMap *_other)
struct MR_std_vector_std_vector_MR_Vector2d MR_std_vector_std_vector_MR_Vector2d
Definition MR2DContoursTriangulation.h:20
MRC_API void MR_PlanarTriangulation_IntersectionsMap_Set_shift(MR_PlanarTriangulation_IntersectionsMap *_this, MR_uint64_t value)
MRC_API MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_DefaultConstruct(void)
MRC_API const MR_PlanarTriangulation_WindingMode * MR_PlanarTriangulation_BaseOutlineParameters_Get_innerType(const MR_PlanarTriangulation_BaseOutlineParameters *_this)
MRC_API MR_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_ConstructFrom(MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo *indicesMap, const MR_PlanarTriangulation_BaseOutlineParameters *baseParams)
MRC_API MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_AssignFromAnother(MR_PlanarTriangulation_BaseOutlineParameters *_this, const MR_PlanarTriangulation_BaseOutlineParameters *_other)
MRC_API bool * MR_PlanarTriangulation_BaseOutlineParameters_GetMutable_allowMerge(MR_PlanarTriangulation_BaseOutlineParameters *_this)
MRC_API const MR_VertId * MR_PlanarTriangulation_IntersectionInfo_Get_uDest(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Set_uDest(MR_PlanarTriangulation_IntersectionInfo *_this, MR_VertId value)
MRC_API MR_std_vector_std_vector_MR_Vector2f * MR_PlanarTriangulation_getOutline_std_vector_std_vector_MR_Vector2d(const MR_std_vector_std_vector_MR_Vector2d *contours, const MR_PlanarTriangulation_OutlineParameters *params)
MRC_API void MR_PlanarTriangulation_IntersectionInfo_DestroyArray(const MR_PlanarTriangulation_IntersectionInfo *_this)
Destroys a heap-allocated array of MR_PlanarTriangulation_IntersectionInfo. Does nothing if the point...
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Set_lRatio(MR_PlanarTriangulation_IntersectionInfo *_this, float value)
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:18
MRC_API MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_OffsetMutablePtr(MR_PlanarTriangulation_IntersectionInfo *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_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo ** MR_PlanarTriangulation_OutlineParameters_GetMutable_indicesMap(MR_PlanarTriangulation_OutlineParameters *_this)
MRC_API MR_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_AssignFromAnother(MR_PlanarTriangulation_IntersectionsMap *_this, MR_PassBy _other_pass_by, MR_PlanarTriangulation_IntersectionsMap *_other)
MRC_API const MR_uint64_t * MR_PlanarTriangulation_IntersectionsMap_Get_shift(const MR_PlanarTriangulation_IntersectionsMap *_this)
struct MR_std_vector_std_vector_MR_VertId MR_std_vector_std_vector_MR_VertId
Definition MR2DContoursTriangulation.h:22
MRC_API MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_AssignFromAnother(MR_PlanarTriangulation_IntersectionInfo *_this, const MR_PlanarTriangulation_IntersectionInfo *_other)
MRC_API MR_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_OffsetMutablePtr(MR_PlanarTriangulation_OutlineParameters *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_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_OutlineParameters_GetMutable_baseParams(MR_PlanarTriangulation_OutlineParameters *_this)
MRC_API MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_ConstructFromAnother(const MR_PlanarTriangulation_BaseOutlineParameters *_other)
MRC_API MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_DefaultConstructArray(size_t num_elems)
MRC_API const float * MR_PlanarTriangulation_IntersectionInfo_Get_lRatio(const MR_PlanarTriangulation_IntersectionInfo *_this)
MRC_API MR_PlanarTriangulation_WindingMode * MR_PlanarTriangulation_BaseOutlineParameters_GetMutable_innerType(MR_PlanarTriangulation_BaseOutlineParameters *_this)
MRC_API MR_std_vector_std_vector_MR_VertId * MR_PlanarTriangulation_findHoleVertIdsByHoleEdges(const MR_MeshTopology *tp, const MR_std_vector_std_vector_MR_EdgeId *holePaths)
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:15
MRC_API void MR_PlanarTriangulation_OutlineParameters_Destroy(const MR_PlanarTriangulation_OutlineParameters *_this)
Destroys a heap-allocated instance of MR_PlanarTriangulation_OutlineParameters. Does nothing if the p...
MRC_API MR_PlanarTriangulation_IntersectionInfo * MR_PlanarTriangulation_IntersectionInfo_ConstructFromAnother(const MR_PlanarTriangulation_IntersectionInfo *_other)
MRC_API const MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_OutlineParameters_Get_baseParams(const MR_PlanarTriangulation_OutlineParameters *_this)
MRC_API void MR_PlanarTriangulation_OutlineParameters_Set_baseParams(MR_PlanarTriangulation_OutlineParameters *_this, const MR_PlanarTriangulation_BaseOutlineParameters *value)
MRC_API void MR_PlanarTriangulation_BaseOutlineParameters_Set_allowMerge(MR_PlanarTriangulation_BaseOutlineParameters *_this, bool value)
MRC_API void MR_PlanarTriangulation_OutlineParameters_Set_indicesMap(MR_PlanarTriangulation_OutlineParameters *_this, MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo *value)
MRC_API const MR_PlanarTriangulation_BaseOutlineParameters * MR_PlanarTriangulation_BaseOutlineParameters_OffsetPtr(const MR_PlanarTriangulation_BaseOutlineParameters *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_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo *const * MR_PlanarTriangulation_OutlineParameters_Get_indicesMap(const MR_PlanarTriangulation_OutlineParameters *_this)
struct MR_PlanarTriangulation_IntersectionsMap MR_PlanarTriangulation_IntersectionsMap
Definition MR2DContoursTriangulation.h:41
MRC_API void MR_PlanarTriangulation_BaseOutlineParameters_DestroyArray(const MR_PlanarTriangulation_BaseOutlineParameters *_this)
Destroys a heap-allocated array of MR_PlanarTriangulation_BaseOutlineParameters. Does nothing if the ...
MRC_API MR_Mesh * MR_PlanarTriangulation_getOutlineMesh_std_vector_std_vector_MR_Vector2f(const MR_std_vector_std_vector_MR_Vector2f *contours, MR_PlanarTriangulation_IntersectionsMap *interMap, const MR_PlanarTriangulation_BaseOutlineParameters *params)
MRC_API void MR_PlanarTriangulation_IntersectionInfo_Set_uRatio(MR_PlanarTriangulation_IntersectionInfo *_this, float value)
MRC_API const bool * MR_PlanarTriangulation_BaseOutlineParameters_Get_allowMerge(const MR_PlanarTriangulation_BaseOutlineParameters *_this)
MRC_API MR_VertId * MR_PlanarTriangulation_IntersectionInfo_GetMutable_uOrg(MR_PlanarTriangulation_IntersectionInfo *_this)
struct MR_std_vector_MR_PlanarTriangulation_IntersectionInfo MR_std_vector_MR_PlanarTriangulation_IntersectionInfo
Definition MR2DContoursTriangulation.h:17
MRC_API const MR_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_OffsetPtr(const MR_PlanarTriangulation_OutlineParameters *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_PlanarTriangulation_OutlineParameters * MR_PlanarTriangulation_OutlineParameters_DefaultConstructArray(size_t num_elems)
MRC_API MR_PlanarTriangulation_IntersectionsMap * MR_PlanarTriangulation_IntersectionsMap_DefaultConstructArray(size_t num_elems)
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MR_PassBy
Definition common.h:23
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition exports.h:11
Definition MRId.h:55