|
Blender V4.3
|
Go to the source code of this file.
Macros | |
| #define | GROW(len_alloc) ((len_alloc) + ((len_alloc) - ((len_alloc) / 2))) |
| #define | GROW_ARRAY(mem, len_alloc) |
| #define | GROW_ARRAY_AS_NEEDED(mem, len_alloc, index) |
Functions | |
| BLI_INLINE bool | partial_elem_vert_ensure (BMPartialUpdate *bmpinfo, BLI_bitmap *verts_tag, BMVert *v) |
| BLI_INLINE bool | partial_elem_face_ensure (BMPartialUpdate *bmpinfo, BLI_bitmap *faces_tag, BMFace *f) |
| BMPartialUpdate * | BM_mesh_partial_create_from_verts (BMesh *bm, const BMPartialUpdate_Params *params, const BLI_bitmap *verts_mask, const int verts_mask_count) |
| BMPartialUpdate * | BM_mesh_partial_create_from_verts_group_single (BMesh *bm, const BMPartialUpdate_Params *params, const BLI_bitmap *verts_mask, const int verts_mask_count) |
| BMPartialUpdate * | BM_mesh_partial_create_from_verts_group_multi (BMesh *bm, const BMPartialUpdate_Params *params, const int *verts_group, const int verts_group_count) |
| void | BM_mesh_partial_destroy (BMPartialUpdate *bmpinfo) |
Generate data needed for partially updating mesh information. Currently this is used for normals and tessellation.
Transform is the obvious use case where there is no need to update normals or tessellation for geometry which has not been modified.
In the future this could be integrated into GPU updates too.
Operate on everything that's tagged as well as connected geometry. see: BM_mesh_partial_create_from_verts
Operate on everything that is connected to both tagged and un-tagged. see: BM_mesh_partial_create_from_verts_group_single
Reduces computations when transforming isolated regions.
Optionally support multiple groups since axis-mirror (for example) will transform vertices in different directions, as well as keeping centered vertices. see: BM_mesh_partial_create_from_verts_group_multi
Definition in file bmesh_mesh_partial_update.cc.
Grow by 1.5x (rounding up).
Definition at line 50 of file bmesh_mesh_partial_update.cc.
Definition at line 51 of file bmesh_mesh_partial_update.cc.
Definition at line 57 of file bmesh_mesh_partial_update.cc.
Referenced by partial_elem_face_ensure(), and partial_elem_vert_ensure().
| BMPartialUpdate * BM_mesh_partial_create_from_verts | ( | BMesh * | bm, |
| const BMPartialUpdate_Params * | params, | ||
| const BLI_bitmap * | verts_mask, | ||
| const int | verts_mask_count ) |
Definition at line 90 of file bmesh_mesh_partial_update.cc.
References BLI_assert, BLI_BITMAP_NEW, BLI_BITMAP_TEST, bm, BM_DISK_EDGE_NEXT, BM_elem_index_set, BM_FACE, BM_FACE_FIRST_LOOP, BM_ITER_MESH_INDEX, BM_mesh_elem_index_ensure(), BM_VERTS_OF_MESH, BMVert::e, BMLoop::f, BMPartialUpdate::faces, BMPartialUpdate::faces_len, BMPartialUpdate::faces_len_alloc, BMEdge::l, MEM_callocN, MEM_freeN(), MEM_mallocN, min_ii(), BMLoop::next, BMPartialUpdate::params, params, partial_elem_face_ensure(), partial_elem_vert_ensure(), BMLoop::radial_next, BMesh::totface, BMesh::totvert, BMLoop::v, v, BMPartialUpdate::verts, and BMPartialUpdate::verts_len_alloc.
Referenced by mesh_partial_ensure().
| BMPartialUpdate * BM_mesh_partial_create_from_verts_group_multi | ( | BMesh * | bm, |
| const BMPartialUpdate_Params * | params, | ||
| const int * | verts_group, | ||
| const int | verts_group_count ) |
Definition at line 298 of file bmesh_mesh_partial_update.cc.
References BLI_BITMAP_NEW, bm, BM_elem_index_get, BM_elem_index_set, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_vert_find_first_loop(), BM_VERTS_OF_MESH, BMPartialUpdate::faces, BMPartialUpdate::faces_len, BMPartialUpdate::faces_len_alloc, BMFace::len, BMFace::mat_nr, max_ii(), MEM_callocN, MEM_freeN(), MEM_mallocN, min_ii(), BMLoop::next, BMPartialUpdate::params, params, partial_elem_face_ensure(), partial_elem_vert_ensure(), BMLoop::prev, BMesh::totface, BMesh::totvert, UNLIKELY, BMLoop::v, v, BMPartialUpdate::verts, BMPartialUpdate::verts_len, and BMPartialUpdate::verts_len_alloc.
Referenced by mesh_partial_ensure().
| BMPartialUpdate * BM_mesh_partial_create_from_verts_group_single | ( | BMesh * | bm, |
| const BMPartialUpdate_Params * | params, | ||
| const BLI_bitmap * | verts_mask, | ||
| const int | verts_mask_count ) |
Definition at line 202 of file bmesh_mesh_partial_update.cc.
References BLI_BITMAP_NEW, BLI_BITMAP_TEST, bm, BM_elem_index_get, BM_elem_index_set, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_vert_find_first_loop(), BM_VERTS_OF_MESH, BMPartialUpdate::faces, BMPartialUpdate::faces_len, BMPartialUpdate::faces_len_alloc, BMFace::len, max_ii(), MEM_callocN, MEM_freeN(), MEM_mallocN, min_ii(), BMLoop::next, BMPartialUpdate::params, params, partial_elem_face_ensure(), partial_elem_vert_ensure(), BMesh::totface, BMesh::totvert, UNLIKELY, BMLoop::v, v, BMPartialUpdate::verts, BMPartialUpdate::verts_len, and BMPartialUpdate::verts_len_alloc.
Referenced by editmesh_partial_update_begin_fn(), and mesh_partial_ensure().
| void BM_mesh_partial_destroy | ( | BMPartialUpdate * | bmpinfo | ) |
Definition at line 402 of file bmesh_mesh_partial_update.cc.
References BMPartialUpdate::faces, MEM_freeN(), and BMPartialUpdate::verts.
Referenced by editmesh_partial_update_end_fn(), mesh_customdata_free(), and mesh_partial_ensure().
| BLI_INLINE bool partial_elem_face_ensure | ( | BMPartialUpdate * | bmpinfo, |
| BLI_bitmap * | faces_tag, | ||
| BMFace * | f ) |
Definition at line 76 of file bmesh_mesh_partial_update.cc.
References BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, BM_elem_index_get, BMPartialUpdate::faces, BMPartialUpdate::faces_len, BMPartialUpdate::faces_len_alloc, and GROW_ARRAY_AS_NEEDED.
Referenced by BM_mesh_partial_create_from_verts(), BM_mesh_partial_create_from_verts_group_multi(), and BM_mesh_partial_create_from_verts_group_single().
| BLI_INLINE bool partial_elem_vert_ensure | ( | BMPartialUpdate * | bmpinfo, |
| BLI_bitmap * | verts_tag, | ||
| BMVert * | v ) |
Definition at line 62 of file bmesh_mesh_partial_update.cc.
References BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, BM_elem_index_get, GROW_ARRAY_AS_NEEDED, v, BMPartialUpdate::verts, BMPartialUpdate::verts_len, and BMPartialUpdate::verts_len_alloc.
Referenced by BM_mesh_partial_create_from_verts(), BM_mesh_partial_create_from_verts_group_multi(), and BM_mesh_partial_create_from_verts_group_single().