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
24
25// stores optional output params for trimWithPlane function
28
42
43//Input plane to cut mesh with
48
49//Input plane to cut mesh with
54
55//Input plane to cut mesh with
60
61// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
66
67// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
71
72// if existing vertex is within eps distance from the plane, then move the vertex not introducing new ones
77
78// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
83
84// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
88
89// is invoked each time when an edge is split. Receives edge ID before split, edge ID after split, and weight of the origin vertex
94
98
103
108
111
114
118
121
124
129
130// newly appeared hole boundary edges
135
136// newly appeared hole boundary edges
140
141// newly appeared hole boundary edges
146
147// newly appeared hole contours where each edge does not have right face
152
153// newly appeared hole contours where each edge does not have right face
157
158// newly appeared hole contours where each edge does not have right face
163
164// mapping from newly appeared triangle to its original triangle (part to full)
169
170// mapping from newly appeared triangle to its original triangle (part to full)
174
175// mapping from newly appeared triangle to its original triangle (part to full)
180
181// left part of the trimmed mesh
186
187// left part of the trimmed mesh
191
192// left part of the trimmed mesh
197
198// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
203
204// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
208
209// mapping from newly appeared triangle to its original triangle (part to full) in otherPart
214
215// newly appeared hole contours where each edge does not have right face in otherPart
220
221// newly appeared hole contours where each edge does not have right face in otherPart
225
226// newly appeared hole contours where each edge does not have right face in otherPart
231
235
240
244
247
250
255
258
261
267
281
282#ifdef __cplusplus
283} // extern "C"
284#endif
struct MR_std_vector_std_vector_MR_EdgeId MR_std_vector_std_vector_MR_EdgeId
Definition MR2DContoursTriangulation.h:19
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTreeBase.h:25
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:29
struct MR_Plane3f MR_Plane3f
Definition MRBestFit.h:23
struct MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId MR_phmap_flat_hash_map_MR_FaceId_MR_FaceId
Definition MRBitSet.h:43
struct MR_Mesh MR_Mesh
Definition MRCtm.h:13
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
Generated from class MR::TrimOptionalOutput.
Definition MRMeshTrimWithPlane.h:27
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
Generated from class MR::TrimWithPlaneParams.
Definition MRMeshTrimWithPlane.h:23
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:19
#define MRC_API
Definition exports.h:11