MeshLib C Docs
Loading...
Searching...
No Matches
MRPartMapping.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/exports.h>
4
5#include <stddef.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct MR_FaceMap MR_FaceMap; // Defined in `#include <MRCMesh/MRVector.h>`.
12typedef struct MR_MapOrHashMap_MR_FaceId_MR_FaceId MR_MapOrHashMap_MR_FaceId_MR_FaceId; // Defined in `#include <MRCMesh/MRMapOrHashMap.h>`.
13typedef struct MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId; // Defined in `#include <MRCMesh/MRMapOrHashMap.h>`.
14typedef struct MR_MapOrHashMap_MR_VertId_MR_VertId MR_MapOrHashMap_MR_VertId_MR_VertId; // Defined in `#include <MRCMesh/MRMapOrHashMap.h>`.
15typedef struct MR_VertMap MR_VertMap; // Defined in `#include <MRCMesh/MRVector.h>`.
16typedef struct MR_WholeEdgeMap MR_WholeEdgeMap; // Defined in `#include <MRCMesh/MRVector.h>`.
17
18
22
26
30
31// source.id -> target.id
32// each map here can be either dense vector or hash map, the type is set by the user and preserved by mesh copying functions;
33// dense maps are better by speed and memory when source mesh is packed and must be copied entirely;
34// hash maps minimize memory consumption when only a small portion of source mesh is copied
39
40// source.id -> target.id
41// each map here can be either dense vector or hash map, the type is set by the user and preserved by mesh copying functions;
42// dense maps are better by speed and memory when source mesh is packed and must be copied entirely;
43// hash maps minimize memory consumption when only a small portion of source mesh is copied
47
48// source.id -> target.id
49// each map here can be either dense vector or hash map, the type is set by the user and preserved by mesh copying functions;
50// dense maps are better by speed and memory when source mesh is packed and must be copied entirely;
51// hash maps minimize memory consumption when only a small portion of source mesh is copied
56
61
65
70
75
79
84
85// target.id -> source.id
86// dense vectors are better by speed and memory when target mesh was empty before copying
91
92// target.id -> source.id
93// dense vectors are better by speed and memory when target mesh was empty before copying
97
98// target.id -> source.id
99// dense vectors are better by speed and memory when target mesh was empty before copying
104
109
113
118
123
127
132
136
141
145
148
151
156
159
162
168
173
177
180
183
186
189
194
199
203
206
209
212
215
220
225
226#ifdef __cplusplus
227} // extern "C"
228#endif
struct MR_VertMap MR_VertMap
Definition MRBitSet.h:41
struct MR_FaceMap MR_FaceMap
Definition MRBitSet.h:27
struct MR_WholeEdgeMap MR_WholeEdgeMap
Definition MRBooleanOperation.h:21
struct MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId
Definition MRMapEdge.h:10
struct MR_MapOrHashMap_MR_FaceId_MR_FaceId MR_MapOrHashMap_MR_FaceId_MR_FaceId
Definition MRMapOrHashMap.h:34
struct MR_MapOrHashMap_MR_VertId_MR_VertId MR_MapOrHashMap_MR_VertId_MR_VertId
Definition MRMapOrHashMap.h:40
struct MR_PartMapping MR_PartMapping
Definition MRMesh.h:31
MRC_API void MR_PartMapping_Destroy(const MR_PartMapping *_this)
Destroys a heap-allocated instance of MR_PartMapping. Does nothing if the pointer is null.
MRC_API void MR_PartMapping_Set_src2tgtFaces(MR_PartMapping *_this, MR_MapOrHashMap_MR_FaceId_MR_FaceId *value)
MRC_API MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId ** MR_PartMapping_GetMutable_src2tgtEdges(MR_PartMapping *_this)
MRC_API MR_PartMapping * MR_PartMapping_ConstructFromAnother(const MR_PartMapping *_other)
MRC_API MR_Tgt2SrcMaps * MR_Tgt2SrcMaps_OffsetMutablePtr(MR_Tgt2SrcMaps *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_MapOrHashMap_MR_FaceId_MR_FaceId ** MR_PartMapping_GetMutable_src2tgtFaces(MR_PartMapping *_this)
MRC_API const MR_PartMapping * MR_Src2TgtMaps_getPartMapping(const MR_Src2TgtMaps *_this)
MRC_API void MR_PartMapping_Set_src2tgtEdges(MR_PartMapping *_this, MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId *value)
MRC_API void MR_PartMapping_Set_tgt2srcFaces(MR_PartMapping *_this, MR_MapOrHashMap_MR_FaceId_MR_FaceId *value)
MRC_API MR_PartMapping * MR_PartMapping_DefaultConstruct(void)
MRC_API const MR_PartMapping * MR_Tgt2SrcMaps_ConvertTo_const_MR_PartMapping_ref(const MR_Tgt2SrcMaps *_this)
MRC_API MR_MapOrHashMap_MR_FaceId_MR_FaceId ** MR_PartMapping_GetMutable_tgt2srcFaces(MR_PartMapping *_this)
MRC_API MR_MapOrHashMap_MR_VertId_MR_VertId *const * MR_PartMapping_Get_src2tgtVerts(const MR_PartMapping *_this)
MRC_API MR_Tgt2SrcMaps * MR_Tgt2SrcMaps_Construct(MR_FaceMap *outFmap, MR_VertMap *outVmap, MR_WholeEdgeMap *outEmap)
struct MR_Tgt2SrcMaps MR_Tgt2SrcMaps
Definition MRPartMapping.h:29
MRC_API const MR_PartMapping * MR_Tgt2SrcMaps_getPartMapping(const MR_Tgt2SrcMaps *_this)
MRC_API MR_MapOrHashMap_MR_VertId_MR_VertId ** MR_PartMapping_GetMutable_tgt2srcVerts(MR_PartMapping *_this)
MRC_API MR_PartMapping * MR_PartMapping_AssignFromAnother(MR_PartMapping *_this, const MR_PartMapping *_other)
MRC_API MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId *const * MR_PartMapping_Get_tgt2srcEdges(const MR_PartMapping *_this)
MRC_API MR_Src2TgtMaps * MR_Src2TgtMaps_OffsetMutablePtr(MR_Src2TgtMaps *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_PartMapping_DestroyArray(const MR_PartMapping *_this)
Destroys a heap-allocated array of MR_PartMapping. Does nothing if the pointer is null.
MRC_API MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId *const * MR_PartMapping_Get_src2tgtEdges(const MR_PartMapping *_this)
MRC_API void MR_Tgt2SrcMaps_Destroy(const MR_Tgt2SrcMaps *_this)
Destroys a heap-allocated instance of MR_Tgt2SrcMaps. Does nothing if the pointer is null.
MRC_API void MR_PartMapping_Set_tgt2srcVerts(MR_PartMapping *_this, MR_MapOrHashMap_MR_VertId_MR_VertId *value)
MRC_API MR_PartMapping * MR_PartMapping_DefaultConstructArray(size_t num_elems)
MRC_API void MR_PartMapping_clear(MR_PartMapping *_this)
MRC_API void MR_PartMapping_Set_src2tgtVerts(MR_PartMapping *_this, MR_MapOrHashMap_MR_VertId_MR_VertId *value)
MRC_API const MR_PartMapping * MR_PartMapping_OffsetPtr(const MR_PartMapping *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_MapOrHashMap_MR_FaceId_MR_FaceId *const * MR_PartMapping_Get_src2tgtFaces(const MR_PartMapping *_this)
MRC_API void MR_Tgt2SrcMaps_DestroyArray(const MR_Tgt2SrcMaps *_this)
Destroys a heap-allocated array of MR_Tgt2SrcMaps. Does nothing if the pointer is null.
MRC_API MR_Src2TgtMaps * MR_Src2TgtMaps_Construct(MR_FaceMap *outFmap, MR_VertMap *outVmap, MR_WholeEdgeMap *outEmap)
MRC_API const MR_Tgt2SrcMaps * MR_Tgt2SrcMaps_OffsetPtr(const MR_Tgt2SrcMaps *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_PartMapping * MR_PartMapping_OffsetMutablePtr(MR_PartMapping *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_Src2TgtMaps * MR_Src2TgtMaps_OffsetPtr(const MR_Src2TgtMaps *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_PartMapping * MR_PartMapping_ConstructFrom(MR_MapOrHashMap_MR_FaceId_MR_FaceId *src2tgtFaces, MR_MapOrHashMap_MR_VertId_MR_VertId *src2tgtVerts, MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId *src2tgtEdges, MR_MapOrHashMap_MR_FaceId_MR_FaceId *tgt2srcFaces, MR_MapOrHashMap_MR_VertId_MR_VertId *tgt2srcVerts, MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId *tgt2srcEdges)
MRC_API const MR_PartMapping * MR_Src2TgtMaps_ConvertTo_const_MR_PartMapping_ref(const MR_Src2TgtMaps *_this)
MRC_API MR_MapOrHashMap_MR_VertId_MR_VertId ** MR_PartMapping_GetMutable_src2tgtVerts(MR_PartMapping *_this)
MRC_API MR_MapOrHashMap_MR_VertId_MR_VertId *const * MR_PartMapping_Get_tgt2srcVerts(const MR_PartMapping *_this)
MRC_API void MR_Src2TgtMaps_Destroy(const MR_Src2TgtMaps *_this)
Destroys a heap-allocated instance of MR_Src2TgtMaps. Does nothing if the pointer is null.
MRC_API MR_MapOrHashMap_MR_FaceId_MR_FaceId *const * MR_PartMapping_Get_tgt2srcFaces(const MR_PartMapping *_this)
struct MR_Src2TgtMaps MR_Src2TgtMaps
Definition MRPartMapping.h:25
MRC_API void MR_PartMapping_Set_tgt2srcEdges(MR_PartMapping *_this, MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId *value)
MRC_API MR_MapOrHashMap_MR_UndirectedEdgeId_MR_EdgeId ** MR_PartMapping_GetMutable_tgt2srcEdges(MR_PartMapping *_this)
MRC_API void MR_Src2TgtMaps_DestroyArray(const MR_Src2TgtMaps *_this)
Destroys a heap-allocated array of MR_Src2TgtMaps. Does nothing if the pointer is null.
#define MRC_API
Definition exports.h:11