|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_mempool.h"#include "BLI_stack.h"#include "BLI_utildefines_iter.h"#include "bmesh.hh"#include "bmesh_edgeloop.hh"Go to the source code of this file.
Classes | |
| struct | BMEdgeLoopStore |
| struct | VertStep |
Macros | |
| #define | BM_EDGELOOP_IS_CLOSED (1 << 0) |
| #define | EDGELOOP_EPS 1e-10f |
| #define | NODE_AS_V(n) ((BMVert *)((LinkData *)n)->data) |
| #define | NODE_AS_CO(n) ((BMVert *)((LinkData *)n)->data)->co |
| #define | EDGE_SPLIT(node_copy, node_other) |
Generic utility functions for getting edge loops from a mesh.
Definition in file bmesh_edgeloop.cc.
| #define BM_EDGELOOP_IS_CLOSED (1 << 0) |
Definition at line 32 of file bmesh_edgeloop.cc.
Referenced by BM_edgeloop_edges_get(), BM_edgeloop_expand(), BM_edgeloop_from_verts(), BM_edgeloop_is_closed(), and bm_loop_build().
| #define EDGE_SPLIT | ( | node_copy, | |
| node_other ) |
Referenced by BM_edgeloop_expand().
Definition at line 35 of file bmesh_edgeloop.cc.
Referenced by BM_edgeloop_calc_normal(), and BM_edgeloop_calc_normal_aligned().
Definition at line 550 of file bmesh_edgeloop.cc.
Referenced by BM_edgeloop_calc_center(), BM_edgeloop_calc_normal(), and BM_edgeloop_calc_normal_aligned().
Definition at line 549 of file bmesh_edgeloop.cc.
Referenced by BM_edgeloop_edges_get().
| void BM_edgeloop_calc_center | ( | BMesh * | bm, |
| BMEdgeLoopStore * | el_store ) |
Definition at line 570 of file bmesh_edgeloop.cc.
References BMEdgeLoopStore::co, ListBase::first, ListBase::last, len_v3v3(), madd_v3_v3fl(), mul_v3_fl(), LinkData::next, NODE_AS_CO, LinkData::prev, BMEdgeLoopStore::verts, w(), and zero_v3().
Referenced by bm_edgering_pair_interpolate(), and BM_mesh_edgeloops_calc_center().
| bool BM_edgeloop_calc_normal | ( | BMesh * | bm, |
| BMEdgeLoopStore * | el_store ) |
Definition at line 611 of file bmesh_edgeloop.cc.
References add_newell_cross_v3_v3v3(), EDGELOOP_EPS, ListBase::first, ListBase::last, LinkData::next, BMEdgeLoopStore::no, NODE_AS_CO, normalize_v3(), UNLIKELY, BMEdgeLoopStore::verts, and zero_v3().
Referenced by bm_edgering_pair_interpolate(), BM_mesh_edgeloops_calc_normal(), and bridge_loop_pair().
| bool BM_edgeloop_calc_normal_aligned | ( | BMesh * | bm, |
| BMEdgeLoopStore * | el_store, | ||
| const float | no_align[3] ) |
For open loops that are straight lines, calculating the normal as if it were a polygon is meaningless.
Instead use an alignment vector and calculate the normal based on that.
Definition at line 639 of file bmesh_edgeloop.cc.
References add_v3_v3(), cross(), cross_v3_v3v3(), EDGELOOP_EPS, ListBase::first, ListBase::last, LinkData::next, BMEdgeLoopStore::no, NODE_AS_CO, normalize_v3(), sub_v3_v3v3(), UNLIKELY, BMEdgeLoopStore::verts, and zero_v3().
Referenced by bm_edgering_pair_interpolate(), BM_mesh_edgeloops_calc_normal_aligned(), and bridge_loop_pair().
| const float * BM_edgeloop_center_get | ( | BMEdgeLoopStore * | el_store | ) |
Definition at line 544 of file bmesh_edgeloop.cc.
References BMEdgeLoopStore::co.
Referenced by bm_edgering_pair_interpolate(), and bridge_loop_pair().
| BMEdgeLoopStore * BM_edgeloop_copy | ( | BMEdgeLoopStore * | el_store | ) |
Copy a single edge-loop.
Definition at line 492 of file bmesh_edgeloop.cc.
References BLI_duplicatelist(), MEM_mallocN, and BMEdgeLoopStore::verts.
Referenced by bridge_loop_pair().
| void BM_edgeloop_edges_get | ( | BMEdgeLoopStore * | el_store, |
| BMEdge ** | e_arr ) |
Edges are assigned to one vert -> the next.
Definition at line 552 of file bmesh_edgeloop.cc.
References BLI_assert, BM_edge_exists(), BM_EDGELOOP_IS_CLOSED, ListBase::first, BMEdgeLoopStore::flag, ListBase::last, BMEdgeLoopStore::len, node, NODE_AS_V, and BMEdgeLoopStore::verts.
Referenced by bm_edgering_pair_store_create(), and edbm_fill_grid_prepare().
| void BM_edgeloop_expand | ( | BMesh * | bm, |
| BMEdgeLoopStore * | el_store, | ||
| int | el_store_len, | ||
| bool | split, | ||
| GSet * | split_edges ) |
Definition at line 679 of file bmesh_edgeloop.cc.
References BLI_assert, BLI_FOREACH_SPARSE_RANGE, BLI_insertlinkafter(), BLI_insertlinkbefore(), BM_EDGELOOP_IS_CLOSED, EDGE_SPLIT, ListBase::first, BMEdgeLoopStore::flag, BMEdgeLoopStore::len, MEM_dupallocN, LinkData::next, LinkData::prev, and BMEdgeLoopStore::verts.
Referenced by bmo_grid_fill_exec(), and bridge_loop_pair().
| void BM_edgeloop_flip | ( | BMesh * | bm, |
| BMEdgeLoopStore * | el_store ) |
Definition at line 673 of file bmesh_edgeloop.cc.
References BLI_listbase_reverse(), negate_v3(), BMEdgeLoopStore::no, and BMEdgeLoopStore::verts.
Referenced by bm_edge_subdiv_as_loop(), bm_edgering_pair_order(), bmo_grid_fill_exec(), and bridge_loop_pair().
| void BM_edgeloop_free | ( | BMEdgeLoopStore * | el_store | ) |
Definition at line 518 of file bmesh_edgeloop.cc.
References BLI_freelistN(), MEM_freeN(), and BMEdgeLoopStore::verts.
Referenced by BM_mesh_edgeloops_find(), BM_mesh_edgeloops_free(), and bridge_loop_pair().
| BMEdgeLoopStore * BM_edgeloop_from_verts | ( | BMVert ** | v_arr, |
| const int | v_arr_tot, | ||
| bool | is_closed ) |
Definition at line 501 of file bmesh_edgeloop.cc.
References BLI_addtail(), BM_EDGELOOP_IS_CLOSED, LinkData::data, BMEdgeLoopStore::flag, BMEdgeLoopStore::len, MEM_callocN, and BMEdgeLoopStore::verts.
Referenced by bm_edge_subdiv_as_loop().
| bool BM_edgeloop_is_closed | ( | BMEdgeLoopStore * | el_store | ) |
Definition at line 524 of file bmesh_edgeloop.cc.
References BM_EDGELOOP_IS_CLOSED, and BMEdgeLoopStore::flag.
Referenced by bm_edgering_pair_order(), bm_edgering_pair_store_create(), bmo_grid_fill_exec(), bridge_loop_pair(), and edbm_fill_grid_prepare().
| int BM_edgeloop_length_get | ( | BMEdgeLoopStore * | el_store | ) |
Definition at line 534 of file bmesh_edgeloop.cc.
References BMEdgeLoopStore::len.
Referenced by bm_edgering_pair_store_create(), bm_edgering_pair_subdiv(), bm_grid_fill(), bmo_bridge_loops_exec(), bmo_grid_fill_exec(), bridge_loop_pair(), and edbm_fill_grid_prepare().
| const float * BM_edgeloop_normal_get | ( | BMEdgeLoopStore * | el_store | ) |
Definition at line 539 of file bmesh_edgeloop.cc.
References BMEdgeLoopStore::no.
Referenced by bm_edgering_pair_interpolate(), and bridge_loop_pair().
| bool BM_edgeloop_overlap_check | ( | BMEdgeLoopStore * | el_store_a, |
| BMEdgeLoopStore * | el_store_b ) |
Definition at line 770 of file bmesh_edgeloop.cc.
References BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_INTERNAL_TAG, BMEdgeLoopStore::len, LISTBASE_FOREACH, and BMEdgeLoopStore::verts.
Referenced by bmo_grid_fill_exec().
| ListBase * BM_edgeloop_verts_get | ( | BMEdgeLoopStore * | el_store | ) |
Definition at line 529 of file bmesh_edgeloop.cc.
References BMEdgeLoopStore::verts.
Referenced by bm_bridge_best_rotation(), bm_edgeloop_check_overlap_all(), bm_edgeloop_flag_set(), bm_edgeloop_vert_tag(), bm_edgering_pair_calc(), bm_edgering_pair_interpolate(), bm_edgering_pair_order(), bm_edgering_pair_order_is_flipped(), bm_edgering_pair_store_create(), bm_edgering_pair_subdiv(), bm_grid_fill(), bmo_edgeloop_vert_tag(), bmo_grid_fill_exec(), bridge_loop_pair(), and edbm_fill_grid_prepare().
|
static |
Definition at line 63 of file bmesh_edgeloop.cc.
References abs(), BLI_addhead(), BLI_addtail(), BLI_assert, BM_edge_other_vert(), BM_EDGELOOP_IS_CLOSED, BM_elem_flag_disable, BM_elem_flag_test, BM_ELEM_INTERNAL_TAG, bm_vert_other_tag(), count, LinkData::data, BMEdgeLoopStore::flag, BMEdgeLoopStore::len, MEM_callocN, UNLIKELY, v, and BMEdgeLoopStore::verts.
Referenced by BM_mesh_edgeloops_find().
|
static |
Definition at line 203 of file bmesh_edgeloop.cc.
References abs(), BLI_assert, BLI_listbase_is_empty(), BLI_mempool_free(), BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_flag_disable, BM_elem_flag_test, BM_elem_index_get, BM_ELEM_INTERNAL_TAG, BM_ITER_ELEM, e, ListBase::first, VertStep::next, VertStep::v, and vs_add().
Referenced by BM_mesh_edgeloops_find_path().
Definition at line 399 of file bmesh_edgeloop.cc.
References bm, BM_edgeloop_calc_center(), and LISTBASE_FOREACH.
Referenced by bmo_bridge_loops_exec().
Definition at line 406 of file bmesh_edgeloop.cc.
References bm, BM_edgeloop_calc_normal(), and LISTBASE_FOREACH.
Referenced by bmo_bridge_loops_exec().
| void BM_mesh_edgeloops_calc_normal_aligned | ( | BMesh * | bm, |
| ListBase * | eloops, | ||
| const float | no_align[3] ) |
Definition at line 413 of file bmesh_edgeloop.cc.
References bm, BM_edgeloop_calc_normal_aligned(), and LISTBASE_FOREACH.
Definition at line 420 of file bmesh_edgeloop.cc.
References add_v3_v3(), BLI_addtail(), BLI_ASSERT_UNIT_V3, BLI_remlink(), BMEdgeLoopStore::co, dot_v3v3(), fabsf, ListBase::first, FLT_MAX, ListBase::last, len_squared_v3v3(), LISTBASE_FOREACH, mul_v3_fl(), BMEdgeLoopStore::next, BMEdgeLoopStore::no, normalize_v3(), sub_v3_v3v3(), and zero_v3().
Referenced by bmo_bridge_loops_exec().
| int BM_mesh_edgeloops_find | ( | BMesh * | bm, |
| ListBase * | r_eloops, | ||
| bool(* | test_fn )(BMEdge *, void *user_data), | ||
| void * | user_data ) |
Definition at line 109 of file bmesh_edgeloop.cc.
References BLI_addtail(), BLI_assert, BLI_stack_count(), BLI_stack_free(), BLI_stack_new, BLI_stack_pop_n_reverse(), BLI_stack_push(), bm, BM_edgeloop_free(), BM_EDGES_OF_MESH, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_INTERNAL_TAG, BM_ITER_MESH, bm_loop_build(), BM_VERTS_OF_MESH, count, e, BMEdgeLoopStore::len, MEM_callocN, MEM_freeN(), MEM_mallocN, and v.
Referenced by bmo_bridge_loops_exec(), bmo_grid_fill_exec(), bmo_subdivide_edgering_exec(), and edbm_fill_grid_prepare().
| bool BM_mesh_edgeloops_find_path | ( | BMesh * | bm, |
| ListBase * | r_eloops, | ||
| bool(* | test_fn )(BMEdge *, void *user_data), | ||
| void * | user_data, | ||
| BMVert * | v_src, | ||
| BMVert * | v_dst ) |
Definition at line 262 of file bmesh_edgeloop.cc.
References BLI_addhead(), BLI_addtail(), BLI_assert, BLI_mempool_create(), BLI_mempool_destroy(), BLI_MEMPOOL_NOP, BLI_stack_count(), BLI_stack_free(), BLI_stack_new, BLI_stack_pop_n_reverse(), BLI_stack_push(), bm, BM_edge_other_vert(), BM_EDGES_OF_MESH, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_index_set, BM_ELEM_INTERNAL_TAG, BM_ITER_MESH, BM_ITER_MESH_INDEX, bm_loop_path_build_step(), BM_VERT, BM_VERTS_OF_MESH, LinkData::data, BMVert::e, e, BMesh::elem_index_dirty, BMEdgeLoopStore::len, MEM_callocN, MEM_freeN(), MEM_mallocN, BMesh::totedge, v, BMEdgeLoopStore::verts, and vs_add().
Referenced by bmo_grid_fill_exec().
| void BM_mesh_edgeloops_free | ( | ListBase * | eloops | ) |
Definition at line 392 of file bmesh_edgeloop.cc.
References BLI_pophead(), and BM_edgeloop_free().
Referenced by bm_edgering_pair_ringsubd(), bmo_bridge_loops_exec(), bmo_grid_fill_exec(), bmo_subdivide_edgering_exec(), and edbm_fill_grid_prepare().
Definition at line 40 of file bmesh_edgeloop.cc.
References BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_flag_test, BM_ELEM_INTERNAL_TAG, BM_ITER_ELEM, count, e, and v.
Referenced by bm_loop_build().
|
static |
Definition at line 185 of file bmesh_edgeloop.cc.
References BLI_addtail(), BLI_assert, BLI_mempool_alloc(), BM_elem_index_set, BM_vert_in_edge(), BMVert::e, v, and VertStep::v.
Referenced by bm_loop_path_build_step(), and BM_mesh_edgeloops_find_path().