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
51
52// Input plane to cut mesh with
59
60// Input plane to cut mesh with
66
67// 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// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
86
87// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
93
94// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
100
101// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
107
111
116
124
128
132
137
140
143
150
151// newly appeared hole boundary edges
157
158// newly appeared hole boundary edges
164
165// newly appeared hole boundary edges
171
172// newly appeared hole contours where each edge does not have right face
178
179// newly appeared hole contours where each edge does not have right face
185
186// newly appeared hole contours where each edge does not have right face
192
193// mapping from newly appeared triangle to its original triangle (part to full)
199
200// mapping from newly appeared triangle to its original triangle (part to full)
206
207// mapping from newly appeared triangle to its original triangle (part to full)
213
214// left part of the trimmed mesh
220
221// left part of the trimmed mesh
227
228// left part of the trimmed mesh
234
235// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
241
242// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
248
249// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
255
256// newly appeared hole contours where each edge does not have right face in otherPart
262
263// newly appeared hole contours where each edge does not have right face in otherPart
269
270// newly appeared hole contours where each edge does not have right face in otherPart
276
280
285
296
300
304
310
313
316
324
338
339#ifdef __cplusplus
340} // extern "C"
341#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:24
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)
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)
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)
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)
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 include/MRCMisc/exports.h:11