|
Blender V5.0
|
#include "MEM_guardedalloc.h"#include "BLI_bit_vector.hh"#include "BLI_math_base.h"#include "bmesh.hh"Go to the source code of this file.
Classes | |
| class | BitSpan |
| class | BitVector< InlineBufferCapacity, Allocator > |
| class | MutableBitSpan |
Functions | |
| BLI_INLINE bool | partial_elem_vert_ensure (BMPartialUpdate *bmpinfo, MutableBitSpan verts_tag, BMVert *v) |
| BLI_INLINE bool | partial_elem_face_ensure (BMPartialUpdate *bmpinfo, MutableBitSpan faces_tag, BMFace *f) |
| BMPartialUpdate * | BM_mesh_partial_create_from_verts (BMesh &bm, const BMPartialUpdate_Params ¶ms, const BitSpan verts_mask, const int verts_mask_count) |
| BMPartialUpdate * | BM_mesh_partial_create_from_verts_group_single (BMesh &bm, const BMPartialUpdate_Params ¶ms, const BitSpan verts_mask, const int verts_mask_count) |
| BMPartialUpdate * | BM_mesh_partial_create_from_verts_group_multi (BMesh &bm, const BMPartialUpdate_Params ¶ms, const Span< 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.
|
nodiscard |
All Tagged & Connected, see: BM_mesh_partial_create_from_verts Operate on everything that's tagged as well as connected geometry.
Definition at line 77 of file bmesh_mesh_partial_update.cc.
References BLI_assert, 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, BMLoop::f, BMPartialUpdate::faces, i, BMEdge::l, min_ii(), BMLoop::next, BMPartialUpdate::params, params, partial_elem_face_ensure(), partial_elem_vert_ensure(), BMLoop::radial_next, Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::resize(), BMLoop::v, v, and BMPartialUpdate::verts.
Referenced by blender::ed::transform::mesh_partial_ensure().
|
nodiscard |
All Connected, operate on all faces that have vertices in the same group.
Reduces computations when transforming isolated regions.
This is a version of BM_mesh_partial_create_from_verts_group_single that handles multiple groups instead of a bitmap mask.
This is needed for example when transform has mirror enabled, since one side needs to have a different group to the other since a face that has vertices attached to both won't have an affine transformation.
| verts_group | Vertex aligned array of groups. Values are used as follows:
|
| verts_group_count | The number of non-zero values in verts_groups. |
Definition at line 242 of file bmesh_mesh_partial_update.cc.
References 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, i, BMFace::len, BMFace::mat_nr, max_ii(), min_ii(), BMLoop::next, BMPartialUpdate::params, params, partial_elem_face_ensure(), partial_elem_vert_ensure(), BMLoop::prev, Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::resize(), Vector< T, InlineBufferCapacity, Allocator >::size(), UNLIKELY, BMLoop::v, v, and BMPartialUpdate::verts.
Referenced by blender::ed::transform::mesh_partial_ensure().
|
nodiscard |
All Connected, operate on all faces that have both tagged and un-tagged vertices.
Reduces computations when transforming isolated regions.
Definition at line 172 of file bmesh_mesh_partial_update.cc.
References 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, i, BMFace::len, max_ii(), min_ii(), BMLoop::next, BMPartialUpdate::params, params, partial_elem_face_ensure(), partial_elem_vert_ensure(), Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::resize(), Vector< T, InlineBufferCapacity, Allocator >::size(), UNLIKELY, BMLoop::v, v, and BMPartialUpdate::verts.
Referenced by editmesh_partial_update_begin_fn(), and blender::ed::transform::mesh_partial_ensure().
| void BM_mesh_partial_destroy | ( | BMPartialUpdate * | bmpinfo | ) |
Definition at line 320 of file bmesh_mesh_partial_update.cc.
Referenced by editmesh_partial_update_end_fn(), blender::ed::transform::mesh_customdata_free(), and blender::ed::transform::mesh_partial_ensure().
| BLI_INLINE bool partial_elem_face_ensure | ( | BMPartialUpdate * | bmpinfo, |
| MutableBitSpan | faces_tag, | ||
| BMFace * | f ) |
Definition at line 64 of file bmesh_mesh_partial_update.cc.
References Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_INLINE, BM_elem_index_get, BMPartialUpdate::faces, and i.
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, |
| MutableBitSpan | verts_tag, | ||
| BMVert * | v ) |
Definition at line 51 of file bmesh_mesh_partial_update.cc.
References Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_INLINE, BM_elem_index_get, i, v, and BMPartialUpdate::verts.
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().