Blender V5.3
bmesh_core.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "DNA_listBase.h"
12
13#include "BKE_customdata.hh"
14
15#include "bmesh_class.hh"
16
17struct BMLoopList;
18
19namespace blender {
20
26 const BMCustomDataCopyMap &cd_face_map,
27 const BMCustomDataCopyMap &cd_loop_map,
28 BMFace *f,
29 bool copy_verts,
30 bool copy_edges);
31BMFace *BM_face_copy(BMesh *bm, BMFace *f, bool copy_verts, bool copy_edges);
32
44
48BMVert *BM_vert_create(BMesh *bm,
49 const float co[3],
50 const BMVert *v_example,
51 eBMCreateFlag create_flag);
59BMEdge *BM_edge_create(
60 BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, eBMCreateFlag create_flag);
70BMFace *BM_face_create(BMesh *bm,
71 BMVert *const *verts,
72 BMEdge *const *edges,
73 int len,
74 const BMFace *f_example,
75 eBMCreateFlag create_flag);
79BMFace *BM_face_create_verts(BMesh *bm,
80 BMVert **vert_arr,
81 int len,
82 const BMFace *f_example,
83 eBMCreateFlag create_flag,
84 bool create_edges);
85
89void BM_face_edges_kill(BMesh *bm, BMFace *f);
94void BM_face_verts_kill(BMesh *bm, BMFace *f);
95
100void BM_face_kill_loose(BMesh *bm, BMFace *f);
101
105void BM_face_kill(BMesh *bm, BMFace *f);
109void BM_edge_kill(BMesh *bm, BMEdge *e);
113void BM_vert_kill(BMesh *bm, BMVert *v);
114
125bool BM_edge_splice(BMesh *bm, BMEdge *e_dst, BMEdge *e_src);
142bool BM_vert_splice(BMesh *bm, BMVert *v_dst, BMVert *v_src);
148bool BM_vert_splice_check_double_edge(BMVert *v_a, BMVert *v_b);
154bool BM_vert_splice_check_double_face(BMVert *v_a, BMVert *v_b);
162bool BM_vert_collapse_check_double_face(BMVert *v_collapse);
170bool BM_face_split_check_double_face(BMLoop *l_a, BMLoop *l_b, int f_len);
180 const BMLoop *l_a_end,
181 const BMLoop *l_b,
182 const BMLoop *l_b_end);
188 const BMLoop *l_a_end,
189 const BMLoop *l_b,
190 const BMLoop *l_b_end);
191
201void bmesh_kernel_loop_reverse(BMesh *bm,
202 BMFace *f,
203 int cd_loop_mdisp_offset,
204 bool use_loop_mdisp_flip);
205
211void bmesh_face_swap_data(BMFace *f_a, BMFace *f_b);
212
252BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, bool do_del, BMFace **r_double);
256void BM_vert_separate(BMesh *bm,
257 BMVert *v,
258 BMEdge **e_in,
259 int e_in_len,
260 bool copy_select,
261 BMVert ***r_vout,
262 int *r_vout_len);
267 BMesh *bm, BMVert *v, char hflag, bool copy_select, BMVert ***r_vout, int *r_vout_len);
269 BMesh *bm, BMVert *v_dst, BMVert *v_src, bool (*testfn)(BMEdge *, void *arg), void *arg);
270
288 BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len, bool copy_select);
300void bmesh_kernel_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep, bool copy_select);
301
341 BMFace *f,
342 BMLoop *l_v1,
343 BMLoop *l_v2,
344 BMLoop **r_l,
345#ifdef USE_BMESH_HOLES
346 ListBaseT<BMLoopList> *holes,
347#endif
348 BMEdge *example,
349 bool no_double);
350
369BMVert *bmesh_kernel_split_edge_make_vert(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e);
401 BMEdge *e_kill,
402 BMVert *v_kill,
403 bool do_del,
404 bool check_edge_exists,
405 bool kill_degenerate_faces,
406 bool kill_duplicate_faces);
426 BMEdge *e_kill,
427 BMVert *v_kill,
428 bool do_del,
429 bool check_edge_exists,
430 bool kill_degenerate_faces);
462BMFace *bmesh_kernel_join_face_kill_edge(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e);
463
473BMVert *bmesh_kernel_unglue_region_make_vert(BMesh *bm, BMLoop *l_sep);
481BMVert *bmesh_kernel_unglue_region_make_vert_multi(BMesh *bm, BMLoop **larr, int larr_len);
486BMVert *bmesh_kernel_unglue_region_make_vert_multi_isolated(BMesh *bm, BMLoop *l_sep);
487
488} // namespace blender
CustomData interface, see also DNA_customdata_types.h.
These structs are the foundation for all linked lists in the library system.
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263
BMesh Iterators.
BMFace * BM_face_copy(BMesh *bm_dst, const BMCustomDataCopyMap &cd_face_map, const BMCustomDataCopyMap &cd_loop_map, BMFace *f, const bool copy_verts, const bool copy_edges)
BMFace * BM_face_create_verts(BMesh *bm, BMVert **vert_arr, const int len, const BMFace *f_example, const eBMCreateFlag create_flag, const bool create_edges)
bool BM_face_pair_overlap_check_subset_same_winding(const BMLoop *l_a, const BMLoop *l_a_end, const BMLoop *l_b, const BMLoop *l_b_end)
Definition bmesh_core.cc:45
void bmesh_kernel_loop_reverse(BMesh *bm, BMFace *f, const int cd_loop_mdisp_offset, const bool use_loop_mdisp_flip)
Loop Reverse.
BMFace * bmesh_kernel_split_face_make_edge(BMesh *bm, BMFace *f, BMLoop *l_v1, BMLoop *l_v2, BMLoop **r_l, BMEdge *e_example, const bool no_double)
Split Face Make Edge (SFME).
BMVert * bmesh_kernel_join_vert_kill_edge(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool check_edge_exists, const bool kill_degenerate_faces)
Join Vert Kill Edge (JVKE).
void BM_vert_separate_hflag(BMesh *bm, BMVert *v, const char hflag, const bool copy_select, BMVert ***r_vout, int *r_vout_len)
void BM_vert_kill(BMesh *bm, BMVert *v)
void BM_face_edges_kill(BMesh *bm, BMFace *f)
BMVert * bmesh_kernel_unglue_region_make_vert_multi(BMesh *bm, BMLoop **larr, int larr_len)
BMVert * bmesh_kernel_split_edge_make_vert(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e)
Split Edge Make Vert (SEMV).
BMVert * bmesh_kernel_unglue_region_make_vert_multi_isolated(BMesh *bm, BMLoop *l_sep)
ATTR_WARN_UNUSED_RESULT const BMVert * v
BMVert * BM_vert_create(BMesh *bm, const float co[3], const BMVert *v_example, const eBMCreateFlag create_flag)
Main function for creating a new vertex.
BMFace * BM_face_create(BMesh *bm, BMVert *const *verts, BMEdge *const *edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
BMEdge * bmesh_kernel_join_edge_kill_vert(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool check_edge_exists, const bool kill_degenerate_faces, const bool kill_duplicate_faces)
Join Edge Kill Vert (JEKV).
void BM_vert_separate_tested_edges(BMesh *, BMVert *v_dst, BMVert *v_src, bool(*testfn)(BMEdge *, void *arg), void *arg)
void bmesh_kernel_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep, const bool copy_select)
Separate Edge.
void BM_face_verts_kill(BMesh *bm, BMFace *f)
BMFace * BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del, BMFace **r_double)
Join Connected Faces.
void BM_vert_separate(BMesh *bm, BMVert *v, BMEdge **e_in, int e_in_len, const bool copy_select, BMVert ***r_vout, int *r_vout_len)
@ BM_CREATE_NO_DOUBLE
Definition bmesh_core.hh:36
@ BM_CREATE_NOP
Definition bmesh_core.hh:34
@ BM_CREATE_SKIP_CD
Definition bmesh_core.hh:42
bool BM_edge_splice(BMesh *bm, BMEdge *e_dst, BMEdge *e_src)
Splice Edge.
void BM_edge_kill(BMesh *bm, BMEdge *e)
BMFace * bmesh_kernel_join_face_kill_edge(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e)
Join Face Kill Edge (JFKE).
void bmesh_kernel_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len, const bool copy_select)
Separate Vert.
bool BM_face_split_check_double_face(BMLoop *l_a, BMLoop *l_b, const int f_len)
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
BMVert * bmesh_kernel_unglue_region_make_vert(BMesh *bm, BMLoop *l_sep)
Un-glue Region Make Vert (URMV).
void BM_face_kill_loose(BMesh *bm, BMFace *f)
bool BM_vert_splice(BMesh *bm, BMVert *v_dst, BMVert *v_src)
Splice Vert.
bool BM_vert_splice_check_double_edge(BMVert *v_a, BMVert *v_b)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void BM_face_kill(BMesh *bm, BMFace *f)
bool BM_vert_splice_check_double_face(BMVert *v_a, BMVert *v_b)
bool BM_vert_collapse_check_double_face(BMVert *v_collapse)
BMEdge * BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag)
Main function for creating a new edge.
void bmesh_face_swap_data(BMFace *f_a, BMFace *f_b)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
bool BM_face_pair_overlap_check_subset_swap_winding(const BMLoop *l_a, const BMLoop *l_a_end, const BMLoop *l_b, const BMLoop *l_b_end)
Definition bmesh_core.cc:87