90 const int pass = vn->
pass;
98 }
while (vn->
pass == pass);
115 for (i = 0; i < 2; i++) {
118 const int pass = vn->
pass;
124 }
while (vn->
pass == pass);
130 for (i = 0, v_lnk = v_ls; i < v_ls_tot; v_lnk = v_lnk->
next, i++) {
131 vert_arr[i] =
static_cast<BMVert *
>(v_lnk->
link);
152 for (v_lnk = path, i = 0; v_lnk; v_lnk = v_lnk->
next, i++) {
153 vert_arr[i] =
static_cast<BMVert *
>(v_lnk->
link);
196 if (v_next != vn_curr->
prev) {
201 if (vn_curr->
pass != vn_next->
pass) {
203 if (vn_curr->
pass == -vn_next->
pass) {
216 vn_next->
prev = v_curr;
237 if (v_ls_tot == 1 && tot == 1) {
257 const uint path_cost_max,
270 uint path_cost_accum = 0;
280 vn_1->
pass = pass_nr;
281 vn_2->
pass = -pass_nr;
298 if (path_cost_accum >= path_cost_max) {
305 const LinkNode *v_ls_next_old = v_ls_next;
320 *r_path_len = path_len;
321 *r_path_cost = path_cost_accum;
326 if (v_ls_next_old != v_ls_next) {
335 v_ls_prev = v_ls_next;
365 e, *pass_nr, path_cost_max, r_path_len, &path_cost, vnet_info, path_pool);
368 if (path ==
nullptr) {
379 const uint path_len = *r_path_len;
384 for (v_lnk = path, i = 0; v_lnk; v_lnk = v_lnk->
next, i++) {
385 vert_arr[i] =
static_cast<BMVert *
>(v_lnk->
link);
388 i_prev = path_len - 1;
389 for (i = 0; i < path_len; i++) {
397 e_other, *pass_nr, path_cost, &path_len_test, &path_cost_test, vnet_info, path_pool);
405 *r_path_len = path_len_test;
406 *r_path_cost = path_cost_test;
407 path_cost = path_cost_test;
429 if (use_edge_tag ==
false) {
450 e, &pass_nr,
UINT_MAX, &path_len, &path_cost, vnet_info, path_pool);
461 }
while ((l_iter = l_iter->
next) != l_first);
463 if (use_new_face_tag) {
479 MEM_delete(vnet_info);
#define BLI_linklist_prepend_alloca(listp, ptr)
Read Blender memory allocation and freeing.
#define UNUSED_VARS_NDEBUG(...)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
void void BLI_linklist_prepend_pool(LinkNode **listp, void *ptr, struct BLI_mempool *mempool) ATTR_NONNULL(1
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
ATTR_WARN_UNUSED_RESULT const BMVert * v
BMFace * BM_face_create(BMesh *bm, BMVert *const *verts, BMEdge *const *edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
static LinkNode * bm_edgenet_path_calc_best(BMEdge *e, int *pass_nr, uint path_cost_max, uint *r_path_len, uint *r_path_cost, VertNetInfo *vnet_info, BLI_mempool *path_pool)
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
static BMEdge * bm_edgenet_edge_get_next(BMesh *bm, LinkNode **edge_queue, BLI_mempool *edge_queue_pool)
void BM_mesh_edgenet(BMesh *bm, const bool use_edge_tag, const bool use_new_face_tag)
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
static int bm_edge_face(BMEdge *e)
static BMEdge * bm_edgenet_path_step(BMVert *v_curr, LinkNode **v_ls, VertNetInfo *vnet_info, BLI_mempool *path_pool)
static BMFace * bm_edgenet_face_from_path(BMesh *bm, LinkNode *path, const uint path_len)
BLI_mempool * BLI_mempool_create(unsigned int esize, unsigned int elem_num, unsigned int pchunk, unsigned int flag) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
bool BM_edges_from_verts(BMEdge **edge_arr, BMVert **vert_arr, const int len)
void BLI_linklist_free_pool(LinkNode *list, LinkNodeFreeFP freefunc, struct BLI_mempool *mempool)
static bool bm_edge_step_ok(BMEdge *e)
void * BLI_linklist_pop_pool(LinkNode **listp, struct BLI_mempool *mempool) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void BLI_linklist_reverse(LinkNode **listp) ATTR_NONNULL(1)
static bool bm_edgenet_path_check_overlap(BMVert *v1, BMVert *v2, VertNetInfo *vnet_info)
int BLI_mempool_len(const BLI_mempool *pool) ATTR_NONNULL(1)
static LinkNode * bm_edgenet_path_calc(BMEdge *e, const int pass_nr, const uint path_cost_max, uint *r_path_len, uint *r_path_cost, VertNetInfo *vnet_info, BLI_mempool *path_pool)
static uint bm_edgenet_path_from_pass(BMVert *v, LinkNode **v_ls, VertNetInfo *vnet_info, BLI_mempool *path_pool)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
bool BM_face_exists_multi(BMVert **varr, BMEdge **earr, int len)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1