|
Blender V4.5
|
Go to the source code of this file.
Macros | |
| #define | USE_IMMUTABLE_ASSERT |
Variables | |
| const char | bm_iter_itype_htype_map [BM_ITYPE_MAX] |
Functions to abstract looping over bmesh data structures.
See: bmesh_iterators_inlin.c too, some functions are here for speed reasons.
Definition in file bmesh_iterators.cc.
| #define USE_IMMUTABLE_ASSERT |
Notes on iterator implementation:
Iterators keep track of the next element in a sequence. When a step() callback is invoked the current value of 'next' is stored to be returned later and the next variable is incremented.
When the end of a sequence is reached, next should always equal nullptr
The 'bmiter__' prefix is used because these are used in bmesh_iterators_inine.c but should otherwise be seen as private.
Definition at line 361 of file bmesh_iterators.cc.
| int BM_iter_as_array | ( | BMesh * | bm, |
| char | itype, | ||
| void * | data, | ||
| void ** | array, | ||
| int | len ) |
Iterator as Array.
Sometimes its convenient to get the iterator as an array to avoid multiple calls to BM_iter_at_index.
Definition at line 80 of file bmesh_iterators.cc.
References bm, BM_iter_as_array(), BM_iter_new, data, i, itype, and len().
Referenced by BM_iter_as_array(), BM_mesh_elem_table_ensure(), bm_vert_dissolve_fan(), edbm_rip_invoke__vert(), blender::bke::pbvh::pbvh_bmesh_edge_loops(), quad_from_tris(), and skin_fix_hole_no_good_verts().
| void * BM_iter_as_arrayN | ( | BMesh * | bm, |
| char | itype, | ||
| void * | data, | ||
| int * | r_len, | ||
| void ** | stack_array, | ||
| int | stack_array_size ) |
Iterator as Array.
Allocates a new array, has the advantage that you don't need to know the size ahead of time.
Takes advantage of less common iterator usage to avoid counting twice, which you might end up doing when BM_iter_as_array is used.
Caller needs to free the array.
Definition at line 127 of file bmesh_iterators.cc.
References BLI_assert, bm, BM_EDGES_OF_MESH, BM_FACES_OF_MESH, BM_iter_as_arrayN(), BM_iter_init, BM_VERTS_OF_MESH, BMIter::count, data, i, itype, MEM_malloc_arrayN(), BMesh::totedge, BMesh::totface, and BMesh::totvert.
Referenced by BM_iter_as_arrayN(), and BM_mesh_decimate_dissolve().
| void * BM_iter_at_index | ( | BMesh * | bm, |
| char | itype, | ||
| void * | data, | ||
| int | index ) |
Definition at line 58 of file bmesh_iterators.cc.
References bm, BM_iter_at_index(), BM_iter_new, data, i, and itype.
Referenced by BM_iter_at_index(), BM_uv_vert_map_create(), bm_vert_dissolve_fan(), bm_vert_loop_pair(), bpy_bmelemseq_subscript_int(), bridge_loop_pair(), mesh_separate_material(), and stitch_init().
| int BM_iter_elem_count_flag | ( | char | itype, |
| void * | data, | ||
| char | hflag, | ||
| bool | value ) |
Elem Iter Flag Count.
Counts how many flagged / unflagged items are found in this element.
Definition at line 267 of file bmesh_iterators.cc.
References BM_elem_flag_test_bool, BM_ITER_ELEM, BM_iter_elem_count_flag(), data, and itype.
Referenced by BM_iter_elem_count_flag(), bm_vert_is_select_history_open(), and blender::ed::transform::transform_mesh_edge_slide_data_create().
| int BM_iter_mesh_bitmap_from_filter | ( | const char | itype, |
| BMesh * | bm, | ||
| blender::MutableBitSpan | bitmap, | ||
| bool(* | test_fn )(BMElem *, void *user_data), | ||
| void * | user_data ) |
Definition at line 213 of file bmesh_iterators.cc.
References bm, BM_iter_mesh_bitmap_from_filter(), BM_ITER_MESH_INDEX, i, and itype.
Referenced by BM_iter_mesh_bitmap_from_filter().
| int BM_iter_mesh_bitmap_from_filter_tessface | ( | BMesh * | bm, |
| blender::MutableBitSpan | bitmap, | ||
| bool(* | test_fn )(BMFace *, void *user_data), | ||
| void * | user_data ) |
Needed when we want to check faces, but return a loop aligned array.
Definition at line 237 of file bmesh_iterators.cc.
References bm, BM_FACES_OF_MESH, BM_iter_mesh_bitmap_from_filter_tessface(), BM_ITER_MESH_INDEX, i, and BMFace::len.
Referenced by BM_iter_mesh_bitmap_from_filter_tessface().
| int BM_iter_mesh_count | ( | char | itype, |
| BMesh * | bm ) |
Utility function.
Definition at line 35 of file bmesh_iterators.cc.
References BLI_assert, bm, BM_EDGES_OF_MESH, BM_FACES_OF_MESH, BM_iter_mesh_count(), BM_VERTS_OF_MESH, itype, BMesh::totedge, BMesh::totface, and BMesh::totvert.
Referenced by BM_iter_mesh_count().
| int BM_iter_mesh_count_flag | ( | char | itype, |
| BMesh * | bm, | ||
| char | hflag, | ||
| bool | value ) |
Mesh Iter Flag Count.
Counts how many flagged / unflagged items are found in this mesh.
Definition at line 323 of file bmesh_iterators.cc.
References bm, BM_elem_flag_test_bool, BM_ITER_MESH, BM_iter_mesh_count_flag(), and itype.
Referenced by BM_iter_mesh_count_flag(), bmo_collapse_uvs_exec(), and blender::ed::transform::transform_convert_mesh_connectivity_distance().
| void bmiter__edge_of_face_begin | ( | BMIter__edge_of_face * | iter | ) |
Definition at line 617 of file bmesh_iterators.cc.
References BM_FACE_FIRST_LOOP, bmiter__edge_of_face_begin(), BMIter__edge_of_face::l_first, BMIter__edge_of_face::l_next, and BMIter__edge_of_face::pdata.
Referenced by bmiter__edge_of_face_begin(), and switch().
| void * bmiter__edge_of_face_step | ( | BMIter__edge_of_face * | iter | ) |
Definition at line 622 of file bmesh_iterators.cc.
References bmiter__edge_of_face_step(), BMLoop::e, BMIter__edge_of_face::l_first, BMIter__edge_of_face::l_next, and BMLoop::next.
Referenced by bmiter__edge_of_face_step(), and switch().
| void bmiter__edge_of_vert_begin | ( | BMIter__edge_of_vert * | iter | ) |
Definition at line 388 of file bmesh_iterators.cc.
References bmiter__edge_of_vert_begin(), BMVert::e, BMIter__edge_of_vert::e_first, BMIter__edge_of_vert::e_next, and BMIter__edge_of_vert::vdata.
Referenced by bmiter__edge_of_vert_begin(), and switch().
| void * bmiter__edge_of_vert_step | ( | BMIter__edge_of_vert * | iter | ) |
Definition at line 400 of file bmesh_iterators.cc.
References bmesh_disk_edge_next(), bmiter__edge_of_vert_step(), BMIter__edge_of_vert::e_first, BMIter__edge_of_vert::e_next, and BMIter__edge_of_vert::vdata.
Referenced by bmiter__edge_of_vert_step(), and switch().
| void bmiter__elem_of_mesh_begin | ( | BMIter__elem_of_mesh * | iter | ) |
Definition at line 364 of file bmesh_iterators.cc.
References BLI_mempool_iternew(), BLI_mempool_len(), bmiter__elem_of_mesh_begin(), BLI_mempool_iter::pool, and BMIter__elem_of_mesh::pooliter.
Referenced by bmiter__elem_of_mesh_begin(), and switch().
| void * bmiter__elem_of_mesh_step | ( | BMIter__elem_of_mesh * | iter | ) |
Definition at line 372 of file bmesh_iterators.cc.
References BLI_assert, BLI_mempool_iterstep(), BLI_mempool_len(), bmiter__elem_of_mesh_step(), BLI_mempool_iter::pool, and BMIter__elem_of_mesh::pooliter.
Referenced by bmiter__elem_of_mesh_step(), and switch().
| void bmiter__face_of_edge_begin | ( | BMIter__face_of_edge * | iter | ) |
Definition at line 550 of file bmesh_iterators.cc.
References bmiter__face_of_edge_begin(), BMIter__face_of_edge::edata, BMEdge::l, BMIter__face_of_edge::l_first, and BMIter__face_of_edge::l_next.
Referenced by bmiter__face_of_edge_begin(), and switch().
| void * bmiter__face_of_edge_step | ( | BMIter__face_of_edge * | iter | ) |
Definition at line 555 of file bmesh_iterators.cc.
References bmiter__face_of_edge_step(), BMLoop::f, BMIter__face_of_edge::l_first, BMIter__face_of_edge::l_next, and BMLoop::radial_next.
Referenced by bmiter__face_of_edge_step(), and switch().
| void bmiter__face_of_vert_begin | ( | BMIter__face_of_vert * | iter | ) |
Definition at line 418 of file bmesh_iterators.cc.
References bmesh_disk_faceloop_find_first(), bmesh_disk_facevert_count(), bmiter__face_of_vert_begin(), BMLoop::e, BMVert::e, BMIter__face_of_vert::e_first, BMIter__face_of_vert::e_next, BMIter__face_of_vert::l_first, BMIter__face_of_vert::l_next, and BMIter__face_of_vert::vdata.
Referenced by bmiter__face_of_vert_begin(), and switch().
| void * bmiter__face_of_vert_step | ( | BMIter__face_of_vert * | iter | ) |
Definition at line 432 of file bmesh_iterators.cc.
References bmesh_disk_faceedge_find_next(), bmesh_radial_faceloop_find_first(), bmesh_radial_faceloop_find_next(), bmiter__face_of_vert_step(), BMIter__face_of_vert::e_next, BMLoop::f, BMEdge::l, BMIter__face_of_vert::l_first, BMIter__face_of_vert::l_next, and BMIter__face_of_vert::vdata.
Referenced by bmiter__face_of_vert_step(), and switch().
| void bmiter__loop_of_edge_begin | ( | BMIter__loop_of_edge * | iter | ) |
Definition at line 497 of file bmesh_iterators.cc.
References bmiter__loop_of_edge_begin(), BMIter__loop_of_edge::edata, BMEdge::l, BMIter__loop_of_edge::l_first, and BMIter__loop_of_edge::l_next.
Referenced by bmiter__loop_of_edge_begin(), and switch().
| void * bmiter__loop_of_edge_step | ( | BMIter__loop_of_edge * | iter | ) |
Definition at line 502 of file bmesh_iterators.cc.
References bmiter__loop_of_edge_step(), BMIter__loop_of_edge::l_first, BMIter__loop_of_edge::l_next, and BMLoop::radial_next.
Referenced by bmiter__loop_of_edge_step(), and switch().
| void bmiter__loop_of_face_begin | ( | BMIter__loop_of_face * | iter | ) |
Definition at line 640 of file bmesh_iterators.cc.
References BM_FACE_FIRST_LOOP, bmiter__loop_of_face_begin(), BMIter__loop_of_face::l_first, BMIter__loop_of_face::l_next, and BMIter__loop_of_face::pdata.
Referenced by bmiter__loop_of_face_begin(), and switch().
| void * bmiter__loop_of_face_step | ( | BMIter__loop_of_face * | iter | ) |
Definition at line 645 of file bmesh_iterators.cc.
References bmiter__loop_of_face_step(), BMIter__loop_of_face::l_first, BMIter__loop_of_face::l_next, and BMLoop::next.
Referenced by bmiter__loop_of_face_step(), and switch().
| void bmiter__loop_of_loop_begin | ( | BMIter__loop_of_loop * | iter | ) |
Definition at line 521 of file bmesh_iterators.cc.
References bmiter__loop_of_loop_begin(), BMIter__loop_of_loop::l_first, BMIter__loop_of_loop::l_next, BMIter__loop_of_loop::ldata, and BMLoop::radial_next.
Referenced by bmiter__loop_of_loop_begin(), and switch().
| void * bmiter__loop_of_loop_step | ( | BMIter__loop_of_loop * | iter | ) |
Definition at line 531 of file bmesh_iterators.cc.
References bmiter__loop_of_loop_step(), BMIter__loop_of_loop::l_first, BMIter__loop_of_loop::l_next, and BMLoop::radial_next.
Referenced by bmiter__loop_of_loop_step(), and switch().
| void bmiter__loop_of_vert_begin | ( | BMIter__loop_of_vert * | iter | ) |
Definition at line 457 of file bmesh_iterators.cc.
References bmesh_disk_faceloop_find_first(), bmesh_disk_facevert_count(), bmiter__loop_of_vert_begin(), BMLoop::e, BMVert::e, BMIter__loop_of_vert::e_first, BMIter__loop_of_vert::e_next, BMIter__loop_of_vert::l_first, BMIter__loop_of_vert::l_next, and BMIter__loop_of_vert::vdata.
Referenced by bmiter__loop_of_vert_begin(), and switch().
| void * bmiter__loop_of_vert_step | ( | BMIter__loop_of_vert * | iter | ) |
Definition at line 471 of file bmesh_iterators.cc.
References bmesh_disk_faceedge_find_next(), bmesh_radial_faceloop_find_first(), bmesh_radial_faceloop_find_next(), bmiter__loop_of_vert_step(), BMIter__loop_of_vert::e_next, BMEdge::l, BMIter__loop_of_vert::l_first, BMIter__loop_of_vert::l_next, and BMIter__loop_of_vert::vdata.
Referenced by bmiter__loop_of_vert_step(), and switch().
| void bmiter__vert_of_edge_begin | ( | BMIter__vert_of_edge * | iter | ) |
Definition at line 573 of file bmesh_iterators.cc.
References bmiter__vert_of_edge_begin().
Referenced by bmiter__vert_of_edge_begin(), and switch().
| void * bmiter__vert_of_edge_step | ( | BMIter__vert_of_edge * | iter | ) |
Definition at line 578 of file bmesh_iterators.cc.
References bmiter__vert_of_edge_step(), BMIter__vert_of_edge::edata, BMEdge::v1, and BMEdge::v2.
Referenced by bmiter__vert_of_edge_step(), and switch().
| void bmiter__vert_of_face_begin | ( | BMIter__vert_of_face * | iter | ) |
Definition at line 594 of file bmesh_iterators.cc.
References BM_FACE_FIRST_LOOP, bmiter__vert_of_face_begin(), BMIter__vert_of_face::l_first, BMIter__vert_of_face::l_next, and BMIter__vert_of_face::pdata.
Referenced by bmiter__vert_of_face_begin(), and switch().
| void * bmiter__vert_of_face_step | ( | BMIter__vert_of_face * | iter | ) |
Definition at line 599 of file bmesh_iterators.cc.
References bmiter__vert_of_face_step(), BMIter__vert_of_face::l_first, BMIter__vert_of_face::l_next, BMLoop::next, and BMLoop::v.
Referenced by bmiter__vert_of_face_step(), and switch().
| int BMO_iter_as_array | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| char | restrictmask, | ||
| void ** | array, | ||
| int | len ) |
Operator Iterator as Array.
Sometimes its convenient to get the iterator as an array.
Definition at line 100 of file bmesh_iterators.cc.
References BMO_iter_as_array(), BMO_iter_new(), BMO_iter_step(), BMO_OP_MAX_SLOTS, i, and len().
Referenced by bmo_contextual_create_exec(), and BMO_iter_as_array().
| void * BMO_iter_as_arrayN | ( | BMOpSlot | slot_args[BMO_OP_MAX_SLOTS], |
| const char * | slot_name, | ||
| const char | restrictmask, | ||
| int * | r_len, | ||
| void ** | stack_array, | ||
| int | stack_array_size ) |
Definition at line 173 of file bmesh_iterators.cc.
References BLI_assert, BMO_iter_as_arrayN(), BMO_iter_new(), BMO_iter_step(), BMO_OP_MAX_SLOTS, BMO_slot_buffer_len(), i, MEM_malloc_arrayN(), and MEM_reallocN.
Referenced by BMO_iter_as_arrayN().
| int BMO_iter_elem_count_flag | ( | BMesh * | bm, |
| char | itype, | ||
| void * | data, | ||
| short | oflag, | ||
| bool | value ) |
Elem Iter Tool Flag Count.
Counts how many flagged / unflagged items are found in this element.
Definition at line 282 of file bmesh_iterators.cc.
References BLI_assert, bm, BM_EDGE, BM_FACE, BM_ITER_ELEM, bm_iter_itype_htype_map, BM_LOOP, BM_VERT, BMO_edge_flag_test_bool, BMO_face_flag_test_bool, BMO_iter_elem_count_flag(), BMO_vert_flag_test_bool, data, itype, and oflag.
Referenced by bmo_contextual_create_exec(), bmo_edgeloop_fill_exec(), bmo_edgenet_prepare_exec(), and BMO_iter_elem_count_flag().
| const char bm_iter_itype_htype_map[BM_ITYPE_MAX] |
Definition at line 18 of file bmesh_iterators.cc.
Referenced by BMO_iter_elem_count_flag(), bpy_bmelemseq_ensure_lookup_table(), bpy_bmelemseq_index_update(), bpy_bmelemseq_sort(), bpy_bmelemseq_subscript_int(), and bpy_slot_from_py().