57 BMEdge *
e, *keepedge =
nullptr, *baseedge =
nullptr;
80 if (keepedge ==
nullptr &&
len == 3) {
104 if (keepedge ==
nullptr &&
len == 2) {
113 if (
e->l !=
e->l->radial_next) {
158 if (
e->l !=
e->l->radial_next) {
174 if (l_a->
v ==
l_b->
v) {
189 const bool no_double)
207 if (cd_loop_mdisp_offset != -1) {
211#ifdef USE_BMESH_HOLES
219 if (cd_loop_mdisp_offset != -1) {
220 float f_dst_center[3];
221 float f_src_center[3];
230 bm, f_new, f_tmp, f_dst_center, f_src_center, cd_loop_mdisp_offset);
240 if (cd_loop_mdisp_offset != -1) {
278#ifdef USE_BMESH_HOLES
289 for (i = 0; i < n; i++) {
297 for (j = 0; j < 2; j++) {
298 BMEdge *e_iter = (j == 0) ?
e : e_new;
301 if (l_iter->
v == v_new) {
325 const bool join_faces,
326 const bool kill_degenerate_faces,
327 const bool kill_duplicate_faces)
342 const float w[2] = {1.0f - fac, fac};
346 if (l_iter->
v == tv && l_iter->
next->
v == v_kill) {
373 if (faces.size() >= 2) {
393 bm, e_kill, v_kill, do_del,
true, kill_degenerate_faces, kill_duplicate_faces);
405 const bool kill_degenerate_faces,
406 const bool kill_duplicate_faces)
425 bm, e_kill, v_kill, do_del,
true, kill_degenerate_faces);
435 bm, e_kill, v_kill, 1.0f, do_del,
false, kill_degenerate_faces, kill_duplicate_faces);
442 BMesh *
bm,
BMEdge *e_kill,
BMVert *v_kill,
const bool do_del,
const bool kill_degenerate_faces)
460 if (cd_loop_mdisp_offset != -1) {
477 if (r_e !=
nullptr) {
495 if (cd_loop_mdisp_offset != -1) {
497 for (
BMFace *oldface : oldfaces) {
498 float f_center_old[3];
502 for (
int j = 0; j < 2; j++) {
518 bm,
l->
f, oldface, f_center, f_center_old, cd_loop_mdisp_offset);
521 }
while (
l != e1->
l);
526 for (
BMFace *oldface : oldfaces) {
532 for (
int j = 0; j < 2; j++) {
545 }
while (
l != e1->
l);
559 for (i = 0; i < numcuts; i++) {
560 percent = 1.0f /
float(numcuts + 1 - i);
564 r_varr[numcuts - i - 1] = v_new;
572 std::swap(
e->v1,
e->v2);
573 std::swap(
e->v1_disk_link,
e->v2_disk_link);
614 if (la->
v == lb->
v) {
622 if (la->
v == lb->
v) {
637 float ed_dir_new_flip[3];
639 float ed_dir_v1_old[3];
640 float ed_dir_v2_old[3];
642 float ed_dir_v1_new[3];
643 float ed_dir_v2_new[3];
698 if (
dot_v3v3(cross_old, cross_new) < 0.0f) {
703 if (
dot_v3v3(cross_old, cross_new) < 0.0f) {
710 if ((
dot_v3v3(ed_dir_new, ed_dir_v1_new) > 0.999f) ||
711 (
dot_v3v3(ed_dir_new_flip, ed_dir_v2_new) > 0.999f))
733 char f_active_prev = 0;
813 fb->head.hflag = f_hflag_prev_2;
815 if (f_active_prev == 1) {
818 else if (f_active_prev == 2) {
CustomData interface, see also DNA_customdata_types.h.
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
void CustomData_bmesh_interp(CustomData *data, const void **src_blocks, const float *weights, const float *sub_weights, int count, void *dst_block)
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f)
MINLINE float normalize_v3(float n[3])
Read Guarded memory(de)allocation.
void BM_elem_attrs_copy(BMesh *bm, const BMCustomDataCopyMap &map, const BMVert *src, BMVert *dst)
BMVert * bmesh_kernel_unglue_region_make_vert_multi_isolated(BMesh *bm, BMLoop *l_sep)
BMFace * BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
Join Connected Faces.
BMVert * bmesh_kernel_split_edge_make_vert(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **r_e)
Split Edge Make Vert (SEMV)
void BM_face_verts_kill(BMesh *bm, BMFace *f)
void BM_vert_kill(BMesh *bm, BMVert *v)
void BM_face_kill(BMesh *bm, BMFace *f)
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)
BMVert * bmesh_kernel_unglue_region_make_vert_multi(BMesh *bm, BMLoop **larr, int larr_len)
BMVert * bmesh_kernel_unglue_region_make_vert(BMesh *bm, BMLoop *l_sep)
Un-glue Region Make Vert (URMV)
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)
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 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)
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 BM_face_interp_multires_ex(BMesh *bm, BMFace *f_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset)
void BM_face_multires_bounds_smooth(BMesh *bm, BMFace *f)
void BM_loop_interp_from_face(BMesh *bm, BMLoop *l_dst, const BMFace *f_src, const bool do_vertex, const bool do_multires)
void BM_data_interp_face_vert_edge(BMesh *bm, const BMVert *v_src_1, const BMVert *, BMVert *v, BMEdge *e, const float fac)
Data Face-Vert Edge Interpolate.
void BM_data_interp_from_verts(BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v_dst, const float fac)
Data, Interpolate From Verts.
#define BM_ITER_ELEM(ele, iter, data, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
BMFace * BM_face_split_n(BMesh *bm, BMFace *f, BMLoop *l_a, BMLoop *l_b, float cos[][3], int n, BMLoop **r_l, BMEdge *example)
Face Split with intermediate points.
BMVert * BM_face_loop_separate(BMesh *bm, BMLoop *l_sep)
Rip a single face from a vertex fan.
void BM_edge_calc_rotate(BMEdge *e, const bool ccw, BMLoop **r_l1, BMLoop **r_l2)
BMVert * BM_face_loop_separate_multi(BMesh *bm, BMLoop **larr, int larr_len)
bool BM_disk_dissolve(BMesh *bm, BMVert *v)
BMEdge * BM_vert_collapse_faces(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, float fac, const bool do_del, const bool join_faces, const bool kill_degenerate_faces, const bool kill_duplicate_faces)
Vert Collapse Faces.
bool BM_edge_rotate_check_degenerate(BMEdge *e, BMLoop *l1, BMLoop *l2)
Check if Edge Rotate Gives Degenerate Faces.
bool BM_vert_dissolve(BMesh *bm, BMVert *v)
Dissolve Vert.
bool BM_edge_rotate_check_beauty(BMEdge *e, BMLoop *l1, BMLoop *l2)
BMVert * BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
Edge Split.
BMEdge * BM_vert_collapse_edge(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool kill_degenerate_faces, const bool kill_duplicate_faces)
Vert Collapse Faces.
bool BM_edge_rotate_check(BMEdge *e)
Check if Rotate Edge is OK.
BMEdge * BM_edge_rotate(BMesh *bm, BMEdge *e, const bool ccw, const short check_flag)
Rotate Edge.
void BM_edge_verts_swap(BMEdge *e)
BMVert * BM_face_loop_separate_multi_isolated(BMesh *bm, BMLoop *l_sep)
BMFace * BM_faces_join_pair(BMesh *bm, BMLoop *l_a, BMLoop *l_b, const bool do_del)
Faces Join Pair.
BMFace * BM_face_split(BMesh *bm, BMFace *f, BMLoop *l_a, BMLoop *l_b, BMLoop **r_l, BMEdge *example, const bool no_double)
Face Split.
BMVert * BM_edge_collapse(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool kill_degenerate_faces)
BMVert * BM_edge_split_n(BMesh *bm, BMEdge *e, int numcuts, BMVert **r_varr)
Split an edge multiple times evenly.
@ BM_EDGEROT_CHECK_EXISTS
@ BM_EDGEROT_CHECK_BEAUTY
@ BM_EDGEROT_CHECK_SPLICE
@ BM_EDGEROT_CHECK_DEGENERATE
void BM_face_normal_flip(BMesh *bm, BMFace *f)
void BM_face_calc_center_median(const BMFace *f, float r_cent[3])
#define BM_ELEM_API_FLAG_DISABLE(element, f)
#define BM_ELEM_API_FLAG_TEST(element, f)
#define BM_ELEM_API_FLAG_ENABLE(element, f)
int bmesh_disk_count(const BMVert *v)
void BM_edge_ordered_verts(const BMEdge *edge, BMVert **r_v1, BMVert **r_v2)
int BM_vert_edge_count_at_most(const BMVert *v, const int count_max)
bool BM_vert_is_manifold(const BMVert *v)
bool BM_edge_face_pair(BMEdge *e, BMFace **r_fa, BMFace **r_fb)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
BMLoop * BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v)
Other Loop in Face Sharing a Vertex.
bool BM_edge_share_face_check(BMEdge *e1, BMEdge *e2)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
BMLoop * BM_face_vert_share_loop(BMFace *f, BMVert *v)
Return the Loop Shared by Face and Vertex.
BLI_INLINE bool BM_edge_is_contiguous(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_loop_is_adjacent(const BMLoop *l_a, const BMLoop *l_b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
#define BM_vert_face_count_is_equal(v, n)
BLI_INLINE bool BM_edge_is_wire(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
ATTR_WARN_UNUSED_RESULT const BMVert * v
BLI_INLINE BMEdge * bmesh_disk_edge_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void append(const T &value)
draw_view in_light_buf[] float
BLI_INLINE float fb(float length, float L)
ccl_device_inline float3 cos(float3 v)
struct BMLoop * radial_next