52 #define GROW(len_alloc) ((len_alloc) + ((len_alloc) - ((len_alloc) / 2)))
53 #define GROW_ARRAY(mem, len_alloc) \
55 mem = MEM_reallocN(mem, (sizeof(*mem)) * ((len_alloc) = GROW(len_alloc))); \
59 #define GROW_ARRAY_AS_NEEDED(mem, len_alloc, index) \
60 if (UNLIKELY(len_alloc == index)) { \
61 GROW_ARRAY(mem, len_alloc); \
95 const int verts_mask_count)
104 const int default_verts_len_alloc = verts_mask_count;
105 const int default_faces_len_alloc =
min_ii(
bm->
totface, verts_mask_count);
145 if (e_iter !=
NULL) {
150 if (e_iter->
l !=
NULL) {
154 if (l_iter->
v ==
v) {
157 }
while ((l_iter = l_iter->
radial_next) != l_first);
179 for (
int i = 0; i < bmpinfo->
faces_len; i++) {
185 }
while ((l_iter = l_iter->
next) != l_first);
205 const int verts_mask_count)
213 const int default_faces_len_alloc = 1;
215 int face_tag_loop_len = 0;
230 enum { SIDE_A = (1 << 0), SIDE_B = (1 << 1) } side_flag = 0;
237 if (
UNLIKELY(side_flag == (SIDE_A | SIDE_B))) {
239 face_tag_loop_len += f->
len;
242 }
while ((l_iter = l_iter->
next) != l_first);
260 for (
int i = 0; i < bmpinfo->
faces_len; i++) {
266 }
while ((l_iter = l_iter->
next) != l_first);
270 if (bmpinfo->
verts_len < verts_mask_count) {
297 const int *verts_group,
298 const int verts_group_count)
309 const int default_faces_len_alloc = 1;
311 int face_tag_loop_len = 0;
330 #ifdef DEBUG_MATERIAL
335 if (
UNLIKELY((group_iter != group_test) || (group_iter == -1))) {
337 face_tag_loop_len += f->
len;
338 #ifdef DEBUG_MATERIAL
343 }
while ((l_iter = l_iter->
next) != l_first);
361 for (
int i = 0; i < bmpinfo->
faces_len; i++) {
367 }
while ((l_iter = l_iter->
next) != l_first);
371 if (bmpinfo->
verts_len < verts_group_count) {
397 if (bmpinfo->
verts) {
400 if (bmpinfo->
faces) {
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_index_set(ele, index)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
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)
#define GROW_ARRAY_AS_NEEDED(mem, len_alloc, index)
void BM_mesh_partial_destroy(BMPartialUpdate *bmpinfo)
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)
BMPartialUpdate * BM_mesh_partial_create_from_verts(BMesh *bm, const BMPartialUpdate_Params *params, const BLI_bitmap *verts_mask, const int verts_mask_count)
BMLoop * BM_vert_find_first_loop(BMVert *v)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
struct BMLoop * radial_next
BMPartialUpdate_Params params