Blender V5.0
bmesh_mesh_partial_update.hh File Reference
#include "BLI_bit_span.hh"
#include "BLI_compiler_attrs.h"
#include "BLI_vector.hh"
#include "bmesh_class.hh"

Go to the source code of this file.

Classes

struct  BMPartialUpdate_Params
struct  BMPartialUpdate

Functions

BMPartialUpdateBM_mesh_partial_create_from_verts (BMesh &bm, const BMPartialUpdate_Params &params, blender::BitSpan verts_mask, int verts_mask_count)
BMPartialUpdateBM_mesh_partial_create_from_verts_group_single (BMesh &bm, const BMPartialUpdate_Params &params, blender::BitSpan verts_mask, int verts_mask_count)
BMPartialUpdateBM_mesh_partial_create_from_verts_group_multi (BMesh &bm, const BMPartialUpdate_Params &params, blender::Span< int > verts_group, int verts_group_count)
void BM_mesh_partial_destroy (BMPartialUpdate *bmpinfo) ATTR_NONNULL(1)

Function Documentation

◆ BM_mesh_partial_create_from_verts()

◆ BM_mesh_partial_create_from_verts_group_multi()

BMPartialUpdate * BM_mesh_partial_create_from_verts_group_multi ( BMesh & bm,
const BMPartialUpdate_Params & params,
blender::Span< int > verts_group,
int verts_group_count )
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.

Parameters
verts_groupVertex aligned array of groups. Values are used as follows:
  • >0: Each face is grouped with other faces of the same group.
  • 0: Not in a group (don't handle these).
  • -1: Don't use grouping logic (include any face that contains a vertex with this group).
verts_group_countThe 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().

◆ BM_mesh_partial_create_from_verts_group_single()

◆ BM_mesh_partial_destroy()