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#include <stdint.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
16typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
17typedef struct MR_std_optional_MR_Mesh MR_std_optional_MR_Mesh; // Defined in `#include <MRCMisc/std_optional_MR_Mesh.h>`.
18typedef struct MR_std_vector_MR_PlanarTriangulation_IntersectionInfo MR_std_vector_MR_PlanarTriangulation_IntersectionInfo; // Defined in `#include <MRCMisc/std_vector_MR_PlanarTriangulation_IntersectionInfo.h>`.
19typedef 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>`.
20typedef 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>`.
21typedef 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>`.
22typedef 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>`.
23typedef 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>`.
24
25
28enum // MR_PlanarTriangulation_WindingMode
29{
33};
34
38
42
45
48
55
62
68
75
82
88
95
101
106
112
118
123
129
130// ratio of intersection
131// 0.0 -> point is lOrg
132// 1.0 -> point is lDest
137
138// ratio of intersection
139// 0.0 -> point is lOrg
140// 1.0 -> point is lDest
144
145// ratio of intersection
146// 0.0 -> point is lOrg
147// 1.0 -> point is lDest
152
153// 0.0 -> point is uOrg
154// 1.0 -> point is uDest
159
160// 0.0 -> point is uOrg
161// 1.0 -> point is uDest
165
166// 0.0 -> point is uOrg
167// 1.0 -> point is uDest
172
176
181
185
188
191
196
199
202
208
212
218
223
229
235
240
246
250
255
259
262
265
269
272
275
280
286
291
297
303
308
314
318
323
327
330
333
338
341
344
350
360
368
374
379
385
390
395
400
404
409
414
417
420
425
428
431
437
445
452
464
470
484
491
492#ifdef __cplusplus
493} // extern "C"
494#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
Generated from class MR::PlanarTriangulation::OutlineParameters.
Definition MR2DContoursTriangulation.h:47
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:17
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)
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)
int32_t MR_PlanarTriangulation_WindingMode
Specify mode of detecting inside and outside parts of triangulation.
Definition MR2DContoursTriangulation.h:27
struct MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo MR_std_vector_std_vector_MR_PlanarTriangulation_IntersectionInfo
Definition MR2DContoursTriangulation.h:20
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:22
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:37
struct MR_PlanarTriangulation_BaseOutlineParameters MR_PlanarTriangulation_BaseOutlineParameters
Generated from class MR::PlanarTriangulation::BaseOutlineParameters.
Definition MR2DContoursTriangulation.h:44
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:21
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:19
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:23
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:16
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)
@ MR_PlanarTriangulation_WindingMode_NonZero
Definition MR2DContoursTriangulation.h:30
@ MR_PlanarTriangulation_WindingMode_Positive
Definition MR2DContoursTriangulation.h:31
@ MR_PlanarTriangulation_WindingMode_Negative
Definition MR2DContoursTriangulation.h:32
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:18
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:13
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11
Definition MRId.h:56