MeshLib C Docs
Loading...
Searching...
No Matches
MRPolylineTopology.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_EdgeMap MR_EdgeMap; // Defined in `#include <MRCMesh/MRVector.h>`.
16typedef struct MR_Edges MR_Edges; // Defined in `#include <MRCMesh/MRVector.h>`.
17typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
18typedef struct MR_Vector_MR_EdgeId_MR_VertId MR_Vector_MR_EdgeId_MR_VertId; // Defined in `#include <MRCMesh/MRVector.h>`.
19typedef struct MR_Vector_MR_VertId_MR_EdgeId MR_Vector_MR_VertId_MR_EdgeId; // Defined in `#include <MRCMesh/MRVector.h>`.
20typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
21typedef struct MR_VertMap MR_VertMap; // Defined in `#include <MRCMesh/MRVector.h>`.
22typedef struct MR_WholeEdgeMap MR_WholeEdgeMap; // Defined in `#include <MRCMesh/MRVector.h>`.
23typedef struct MR_std_istream MR_std_istream; // Defined in `#include <MRCMisc/iostream.h>`.
24typedef struct MR_std_ostream MR_std_ostream; // Defined in `#include <MRCMisc/iostream.h>`.
25typedef struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId; // Defined in `#include <MRCMisc/std_vector_MR_EdgeId.h>`.
26typedef struct MR_std_vector_MR_VertId MR_std_vector_MR_VertId; // Defined in `#include <MRCMisc/std_vector_MR_VertId.h>`.
27
28
32
36
40
45
48
51
55
58
61
66
73
78
91
98
103
108
113
118
123
128
133
138
143
148
153
159
164
172
177
182
187
193
199
205
210
215
220
225
230
235
240
245
250
255
260
266
272
277
284
292
299
308
317
325
331
337
343
348
353
358
363
368
373
378
383
386
389
394
397
400
406
412
417
422
423#ifdef __cplusplus
424} // extern "C"
425#endif
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:29
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
struct MR_VertMap MR_VertMap
Definition MRBitSet.h:41
struct MR_EdgeMap MR_EdgeMap
Definition MRBitSet.h:25
struct MR_WholeEdgeMap MR_WholeEdgeMap
Definition MRBooleanOperation.h:21
struct MR_std_vector_MR_EdgeId MR_std_vector_MR_EdgeId
Definition MRContoursStitch.h:11
struct MR_std_ostream MR_std_ostream
Definition MRCtm.h:22
struct MR_std_istream MR_std_istream
Definition MRCtm.h:21
struct MR_std_vector_MR_VertId MR_std_vector_MR_VertId
Definition MREdgePaths.h:30
struct MR_PolylineTopology MR_PolylineTopology
Definition MREdgePoint.h:15
struct MR_Vector_MR_EdgeId_MR_VertId MR_Vector_MR_EdgeId_MR_VertId
Definition MRMeshTopology.h:25
MRC_API MR_PolylineTopology * MR_PolylineTopology_AssignFromAnother(MR_PolylineTopology *_this, MR_PassBy _other_pass_by, MR_PolylineTopology *_other)
MRC_API void MR_PolylineTopology_write(const MR_PolylineTopology *_this, MR_std_ostream *s)
MRC_API MR_EdgeId MR_PolylineTopology_makePolyline(MR_PolylineTopology *_this, const MR_VertId *vs, MR_uint64_t num)
MRC_API MR_EdgeId MR_PolylineTopology_makeEdge_3(MR_PolylineTopology *_this, MR_VertId a, MR_VertId b, const MR_EdgeId *e)
MRC_API const MR_PolylineTopology * MR_PolylineTopology_OffsetPtr(const MR_PolylineTopology *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_PolylineMaker MR_PolylineMaker
Definition MRPolylineTopology.h:35
MRC_API MR_VertId MR_PolylineTopology_addVertId(MR_PolylineTopology *_this)
MRC_API const MR_PolylineMaker * MR_PolylineMaker_OffsetPtr(const MR_PolylineMaker *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_EdgeId MR_PolylineTopology_edgeWithOrg(const MR_PolylineTopology *_this, MR_VertId a)
MRC_API void MR_PolylineTopology_setOrg(MR_PolylineTopology *_this, MR_EdgeId a, MR_VertId v)
MRC_API void MR_PolylineMaker_close(MR_PolylineMaker *_this)
MRC_API MR_UndirectedEdgeId MR_PolylineTopology_lastNotLoneUndirectedEdge(const MR_PolylineTopology *_this)
MRC_API MR_EdgeId MR_PolylineTopology_next(const MR_PolylineTopology *_this, MR_EdgeId he)
MRC_API bool MR_PolylineTopology_hasEdge(const MR_PolylineTopology *_this, MR_EdgeId e)
MRC_API bool MR_PolylineTopology_isClosed(const MR_PolylineTopology *_this)
MRC_API MR_EdgeId MR_PolylineTopology_findEdge(const MR_PolylineTopology *_this, MR_VertId o, MR_VertId d)
MRC_API const MR_VertBitSet * MR_PolylineTopology_getValidVerts(const MR_PolylineTopology *_this)
MRC_API bool MR_PolylineTopology_read(MR_PolylineTopology *_this, MR_std_istream *s)
MRC_API MR_EdgeId MR_PolylineMaker_start(MR_PolylineMaker *_this, MR_VertId v)
MRC_API bool MR_PolylineTopology_isConsistentlyOriented(const MR_PolylineTopology *_this)
MRC_API MR_uint64_t MR_PolylineTopology_computeNotLoneUndirectedEdges(const MR_PolylineTopology *_this)
MRC_API void MR_PolylineTopology_edgeReserve(MR_PolylineTopology *_this, MR_uint64_t newCapacity)
MRC_API void MR_PolylineTopology_addPart(MR_PolylineTopology *_this, const MR_PolylineTopology *from, MR_VertMap *outVmap, MR_WholeEdgeMap *outEmap)
MRC_API void MR_PolylineMaker_finishOpen(MR_PolylineMaker *_this, MR_VertId v)
MRC_API void MR_PolylineTopology_DestroyArray(const MR_PolylineTopology *_this)
Destroys a heap-allocated array of MR_PolylineTopology. Does nothing if the pointer is null.
MRC_API MR_VertId MR_PolylineTopology_lastValidVert(const MR_PolylineTopology *_this)
MRC_API MR_PolylineMaker * MR_PolylineMaker_ConstructFromAnother(const MR_PolylineMaker *_other)
MRC_API MR_EdgeId MR_PolylineTopology_lastNotLoneEdge(const MR_PolylineTopology *_this)
MRC_API void MR_PolylineTopology_vertReserve(MR_PolylineTopology *_this, MR_uint64_t newCapacity)
MRC_API MR_PolylineTopology * MR_PolylineTopology_DefaultConstructArray(size_t num_elems)
MRC_API MR_EdgeId MR_PolylineTopology_splitEdge(MR_PolylineTopology *_this, MR_EdgeId e)
MRC_API void MR_PolylineTopology_splice(MR_PolylineTopology *_this, MR_EdgeId a, MR_EdgeId b)
MRC_API MR_uint64_t MR_PolylineTopology_edgeSize(const MR_PolylineTopology *_this)
MRC_API MR_uint64_t MR_PolylineTopology_heapBytes(const MR_PolylineTopology *_this)
MRC_API int32_t MR_PolylineTopology_numValidVerts(const MR_PolylineTopology *_this)
MRC_API MR_Vector_MR_VertId_MR_EdgeId * MR_PolylineTopology_getOrgs(const MR_PolylineTopology *_this)
MRC_API MR_uint64_t MR_PolylineTopology_vertSize(const MR_PolylineTopology *_this)
MRC_API const MR_Vector_MR_EdgeId_MR_VertId * MR_PolylineTopology_edgePerVertex(const MR_PolylineTopology *_this)
MRC_API MR_PolylineTopology * MR_PolylineMaker_Get_topology(const MR_PolylineMaker *_this)
MRC_API void MR_PolylineMaker_Destroy(const MR_PolylineMaker *_this)
Destroys a heap-allocated instance of MR_PolylineMaker. Does nothing if the pointer is null.
MRC_API MR_EdgeId MR_PolylineTopology_makeEdge_0(MR_PolylineTopology *_this)
MRC_API MR_PolylineTopology * MR_PolylineTopology_OffsetMutablePtr(MR_PolylineTopology *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_VertId MR_PolylineTopology_org(const MR_PolylineTopology *_this, MR_EdgeId he)
MRC_API MR_uint64_t MR_PolylineTopology_edgeCapacity(const MR_PolylineTopology *_this)
MRC_API void MR_PolylineTopology_Destroy(const MR_PolylineTopology *_this)
Destroys a heap-allocated instance of MR_PolylineTopology. Does nothing if the pointer is null.
MRC_API void MR_PolylineTopology_vertResize(MR_PolylineTopology *_this, MR_uint64_t newSize)
MRC_API MR_PolylineTopology * MR_PolylineTopology_ConstructFromAnother(MR_PassBy _other_pass_by, MR_PolylineTopology *_other)
MRC_API bool MR_PolylineTopology_hasVert(const MR_PolylineTopology *_this, MR_VertId a)
MRC_API void MR_PolylineTopology_pack(MR_PolylineTopology *_this, MR_VertMap *outVmap, MR_WholeEdgeMap *outEmap)
MRC_API bool MR_not_equal_MR_PolylineTopology(const MR_PolylineTopology *_this, const MR_PolylineTopology *b)
MRC_API void MR_PolylineTopology_addPartByMask(MR_PolylineTopology *_this, const MR_PolylineTopology *from, const MR_UndirectedEdgeBitSet *mask, MR_VertMap *outVmap, MR_EdgeMap *outEmap)
MRC_API void MR_PolylineTopology_deleteEdge(MR_PolylineTopology *_this, MR_UndirectedEdgeId ue)
MRC_API void MR_PolylineTopology_vertResizeWithReserve(MR_PolylineTopology *_this, MR_uint64_t newSize)
MRC_API void MR_PolylineTopology_flip(MR_PolylineTopology *_this)
MRC_API MR_uint64_t MR_PolylineTopology_undirectedEdgeSize(const MR_PolylineTopology *_this)
MRC_API MR_PolylineMaker * MR_PolylineMaker_Construct(MR_PolylineTopology *t)
MRC_API MR_uint64_t MR_PolylineTopology_vertCapacity(const MR_PolylineTopology *_this)
MRC_API int32_t MR_PolylineTopology_makeEdges(MR_PolylineTopology *_this, const MR_Edges *edges)
MRC_API MR_EdgeId MR_PolylineMaker_proceed(MR_PolylineMaker *_this, MR_VertId v)
MRC_API bool MR_equal_MR_PolylineTopology(const MR_PolylineTopology *_this, const MR_PolylineTopology *b)
MRC_API MR_PolylineMaker * MR_PolylineMaker_OffsetMutablePtr(MR_PolylineMaker *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 bool MR_PolylineTopology_checkValidity(const MR_PolylineTopology *_this)
MRC_API void MR_PolylineTopology_computeValidsFromEdges(MR_PolylineTopology *_this)
MRC_API void MR_PolylineTopology_deleteEdges(MR_PolylineTopology *_this, const MR_UndirectedEdgeBitSet *es)
MRC_API void MR_PolylineMaker_DestroyArray(const MR_PolylineMaker *_this)
Destroys a heap-allocated array of MR_PolylineMaker. Does nothing if the pointer is null.
MRC_API MR_uint64_t MR_PolylineTopology_undirectedEdgeCapacity(const MR_PolylineTopology *_this)
struct MR_Vector_MR_VertId_MR_EdgeId MR_Vector_MR_VertId_MR_EdgeId
Definition MRPolylineTopology.h:19
MRC_API MR_PolylineTopology * MR_PolylineTopology_DefaultConstruct(void)
struct MR_Edges MR_Edges
Definition MRPolylineTopology.h:16
MRC_API void MR_PolylineTopology_buildOpenLines(MR_PolylineTopology *_this, const MR_std_vector_MR_VertId *comp2firstVert)
MRC_API MR_VertBitSet * MR_PolylineTopology_getPathVertices(const MR_PolylineTopology *_this, const MR_std_vector_MR_EdgeId *path)
MRC_API int32_t MR_PolylineTopology_getVertDegree(const MR_PolylineTopology *_this, MR_VertId a)
MRC_API const MR_VertBitSet * MR_PolylineTopology_getVertIds(const MR_PolylineTopology *_this, const MR_VertBitSet *region)
MRC_API MR_VertId MR_PolylineTopology_dest(const MR_PolylineTopology *_this, MR_EdgeId he)
MRC_API bool MR_PolylineTopology_isLoneEdge(const MR_PolylineTopology *_this, MR_EdgeId a)
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:152
Definition MRId.h:36
Definition MRId.h:56