MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshTrimWithPlane.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
5
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
13typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
14typedef struct MR_Plane3f MR_Plane3f; // Defined in `#include <MRCMesh/MRPlane3.h>`.
15typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16typedef struct MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId; // Defined in `#include <MRCMisc/phmap_flat_hash_map_MR_FaceId_MR_FaceId.h>`.
17typedef struct MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float; // Defined in `#include <MRCMisc/std_function_void_from_MR_EdgeId_MR_EdgeId_float.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>`.
19
20
21// stores basic params for trimWithPlane function
25
26// stores optional output params for trimWithPlane function
30
44
45//Input plane to cut mesh with
50
51//Input plane to cut mesh with
56
57//Input plane to cut mesh with
62
63// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
68
69// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
73
74// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
79
80// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
85
86// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
90
91// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
96
100
105
110
113
116
120
123
126
131
132// newly appeared hole boundary edges
137
138// newly appeared hole boundary edges
142
143// newly appeared hole boundary edges
148
149// newly appeared hole contours where each edge does not have right face
154
155// newly appeared hole contours where each edge does not have right face
159
160// newly appeared hole contours where each edge does not have right face
165
166// mapping from newly appeared triangle to its original triangle (part to full)
171
172// mapping from newly appeared triangle to its original triangle (part to full)
176
177// mapping from newly appeared triangle to its original triangle (part to full)
182
183// left part of the trimmed mesh
188
189// left part of the trimmed mesh
193
194// left part of the trimmed mesh
199
200// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
205
206// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
210
211// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
216
217// newly appeared hole contours where each edge does not have right face in otherPart
222
223// newly appeared hole contours where each edge does not have right face in otherPart
227
228// newly appeared hole contours where each edge does not have right face in otherPart
233
237
242
246
249
252
257
260
263
269
283
284#ifdef __cplusplus
285} // extern "C"
286#endif
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:18
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:28
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
struct MR_Plane3f MR_Plane3f
Definition MRBestFit.h:22
struct MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId
Definition MRBitSet.h:42
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MRC_API MR_TrimOptionalOutput * MR_TrimOptionalOutput_DefaultConstruct(void)
MRC_API MR_TrimOptionalOutput * MR_TrimOptionalOutput_ConstructFrom(MR_UndirectedEdgeBitSet *outCutEdges, MR_std_vector_std_vector_MR_EdgeId *outCutContours, MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *new2Old, MR_Mesh *otherPart, MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *otherNew2Old, MR_std_vector_std_vector_MR_EdgeId *otherOutCutContours)
MRC_API MR_TrimWithPlaneParams * MR_TrimWithPlaneParams_ConstructFrom(const MR_Plane3f *plane, float eps, MR_PassBy onEdgeSplitCallback_pass_by, MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float *onEdgeSplitCallback)
MRC_API MR_TrimWithPlaneParams * MR_TrimWithPlaneParams_DefaultConstructArray(size_t num_elems)
MRC_API MR_Mesh ** MR_TrimOptionalOutput_GetMutable_otherPart(MR_TrimOptionalOutput *_this)
struct MR_TrimOptionalOutput MR_TrimOptionalOutput
Definition MRMeshTrimWithPlane.h:29
MRC_API MR_FaceBitSet * MR_subdivideWithPlane_5(MR_Mesh *mesh, const MR_Plane3f *plane, MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *new2Old, const float *eps, MR_PassBy onEdgeSplitCallback_pass_by, MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float *onEdgeSplitCallback)
MRC_API void MR_TrimOptionalOutput_Set_outCutContours(MR_TrimOptionalOutput *_this, MR_std_vector_std_vector_MR_EdgeId *value)
MRC_API MR_std_vector_std_vector_MR_EdgeId ** MR_TrimOptionalOutput_GetMutable_outCutContours(MR_TrimOptionalOutput *_this)
MRC_API MR_TrimOptionalOutput * MR_TrimOptionalOutput_AssignFromAnother(MR_TrimOptionalOutput *_this, const MR_TrimOptionalOutput *_other)
MRC_API const MR_TrimWithPlaneParams * MR_TrimWithPlaneParams_OffsetPtr(const MR_TrimWithPlaneParams *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_TrimWithPlaneParams * MR_TrimWithPlaneParams_AssignFromAnother(MR_TrimWithPlaneParams *_this, MR_PassBy _other_pass_by, MR_TrimWithPlaneParams *_other)
MRC_API const float * MR_TrimWithPlaneParams_Get_eps(const MR_TrimWithPlaneParams *_this)
MRC_API MR_TrimWithPlaneParams * MR_TrimWithPlaneParams_OffsetMutablePtr(MR_TrimWithPlaneParams *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_phmap_flat_hash_map_MR_FaceId_MR_FaceId ** MR_TrimOptionalOutput_GetMutable_new2Old(MR_TrimOptionalOutput *_this)
MRC_API MR_TrimOptionalOutput * MR_TrimOptionalOutput_DefaultConstructArray(size_t num_elems)
MRC_API void MR_TrimWithPlaneParams_Set_plane(MR_TrimWithPlaneParams *_this, const MR_Plane3f *value)
struct MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float
Definition MRMeshTrimWithPlane.h:17
MRC_API MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float * MR_TrimWithPlaneParams_GetMutable_onEdgeSplitCallback(MR_TrimWithPlaneParams *_this)
MRC_API MR_Mesh *const * MR_TrimOptionalOutput_Get_otherPart(const MR_TrimOptionalOutput *_this)
MRC_API MR_TrimWithPlaneParams * MR_TrimWithPlaneParams_DefaultConstruct(void)
MRC_API void MR_TrimOptionalOutput_Set_outCutEdges(MR_TrimOptionalOutput *_this, MR_UndirectedEdgeBitSet *value)
MRC_API MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *const * MR_TrimOptionalOutput_Get_new2Old(const MR_TrimOptionalOutput *_this)
MRC_API MR_TrimOptionalOutput * MR_TrimOptionalOutput_OffsetMutablePtr(MR_TrimOptionalOutput *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_EdgeId ** MR_TrimOptionalOutput_GetMutable_otherOutCutContours(MR_TrimOptionalOutput *_this)
MRC_API void MR_TrimOptionalOutput_Set_new2Old(MR_TrimOptionalOutput *_this, MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *value)
struct MR_TrimWithPlaneParams MR_TrimWithPlaneParams
Definition MRMeshTrimWithPlane.h:24
MRC_API void MR_TrimWithPlaneParams_Set_onEdgeSplitCallback(MR_TrimWithPlaneParams *_this, MR_PassBy value_pass_by, MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float *value)
MRC_API MR_UndirectedEdgeBitSet ** MR_TrimOptionalOutput_GetMutable_outCutEdges(MR_TrimOptionalOutput *_this)
MRC_API MR_Plane3f * MR_TrimWithPlaneParams_GetMutable_plane(MR_TrimWithPlaneParams *_this)
MRC_API void MR_TrimWithPlaneParams_Set_eps(MR_TrimWithPlaneParams *_this, float value)
MRC_API void MR_TrimOptionalOutput_Set_otherOutCutContours(MR_TrimOptionalOutput *_this, MR_std_vector_std_vector_MR_EdgeId *value)
MRC_API MR_std_vector_std_vector_MR_EdgeId *const * MR_TrimOptionalOutput_Get_outCutContours(const MR_TrimOptionalOutput *_this)
MRC_API void MR_TrimOptionalOutput_Set_otherPart(MR_TrimOptionalOutput *_this, MR_Mesh *value)
MRC_API MR_TrimWithPlaneParams * MR_TrimWithPlaneParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_TrimWithPlaneParams *_other)
MRC_API const MR_TrimOptionalOutput * MR_TrimOptionalOutput_OffsetPtr(const MR_TrimOptionalOutput *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_TrimOptionalOutput_Set_otherNew2Old(MR_TrimOptionalOutput *_this, MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *value)
MRC_API void MR_trimWithPlane_MR_Mesh(MR_Mesh *mesh, const MR_TrimWithPlaneParams *params, const MR_TrimOptionalOutput *optOut)
trim mesh by plane
MRC_API MR_UndirectedEdgeBitSet *const * MR_TrimOptionalOutput_Get_outCutEdges(const MR_TrimOptionalOutput *_this)
MRC_API MR_std_vector_std_vector_MR_EdgeId *const * MR_TrimOptionalOutput_Get_otherOutCutContours(const MR_TrimOptionalOutput *_this)
MRC_API const MR_std_function_void_from_MR_EdgeId_MR_EdgeId_float * MR_TrimWithPlaneParams_Get_onEdgeSplitCallback(const MR_TrimWithPlaneParams *_this)
MRC_API void MR_TrimWithPlaneParams_DestroyArray(const MR_TrimWithPlaneParams *_this)
Destroys a heap-allocated array of MR_TrimWithPlaneParams. Does nothing if the pointer is null.
MRC_API MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId ** MR_TrimOptionalOutput_GetMutable_otherNew2Old(MR_TrimOptionalOutput *_this)
MRC_API MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId *const * MR_TrimOptionalOutput_Get_otherNew2Old(const MR_TrimOptionalOutput *_this)
MRC_API float * MR_TrimWithPlaneParams_GetMutable_eps(MR_TrimWithPlaneParams *_this)
MRC_API void MR_TrimWithPlaneParams_Destroy(const MR_TrimWithPlaneParams *_this)
Destroys a heap-allocated instance of MR_TrimWithPlaneParams. Does nothing if the pointer is null.
MRC_API MR_TrimOptionalOutput * MR_TrimOptionalOutput_ConstructFromAnother(const MR_TrimOptionalOutput *_other)
MRC_API const MR_Plane3f * MR_TrimWithPlaneParams_Get_plane(const MR_TrimWithPlaneParams *_this)
MRC_API void MR_TrimOptionalOutput_Destroy(const MR_TrimOptionalOutput *_this)
Destroys a heap-allocated instance of MR_TrimOptionalOutput. Does nothing if the pointer is null.
MRC_API void MR_TrimOptionalOutput_DestroyArray(const MR_TrimOptionalOutput *_this)
Destroys a heap-allocated array of MR_TrimOptionalOutput. Does nothing if the pointer is null.
MR_PassBy
Definition common.h:23
#define MRC_API
Definition exports.h:11