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
36
40
43
46
53
60
66
73
80
86
93
99
104
110
116
121
127
128// ratio of intersection
129// 0.0 -> point is lOrg
130// 1.0 -> point is lDest
135
136// ratio of intersection
137// 0.0 -> point is lOrg
138// 1.0 -> point is lDest
142
143// ratio of intersection
144// 0.0 -> point is lOrg
145// 1.0 -> point is lDest
150
151// 0.0 -> point is uOrg
152// 1.0 -> point is uDest
157
158// 0.0 -> point is uOrg
159// 1.0 -> point is uDest
163
164// 0.0 -> point is uOrg
165// 1.0 -> point is uDest
170
174
179
183
186
189
194
197
200
206
210
216
221
227
233
238
244
248
253
257
260
263
267
270
273
278
284
289
295
301
306
312
316
321
325
328
331
336
339
342
348
358
366
372
377
383
388
393
398
402
407
412
415
418
423
426
429
435
443
450
462
468
482
489
490#ifdef __cplusplus
491} // extern "C"
492#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:45
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:35
struct MR_PlanarTriangulation_BaseOutlineParameters MR_PlanarTriangulation_BaseOutlineParameters
Generated from class MR::PlanarTriangulation::BaseOutlineParameters.
Definition MR2DContoursTriangulation.h:42
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:39
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:12
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:55