88 const int pass = vn->
pass;
96 }
while (vn->
pass == pass);
113 for (i = 0; i < 2; i++) {
116 const int pass = vn->
pass;
122 }
while (vn->
pass == pass);
128 for (i = 0, v_lnk = v_ls; i < v_ls_tot; v_lnk = v_lnk->
next, i++) {
129 vert_arr[i] =
static_cast<BMVert *
>(v_lnk->
link);
150 for (v_lnk = path, i = 0; v_lnk; v_lnk = v_lnk->
next, i++) {
151 vert_arr[i] =
static_cast<BMVert *
>(v_lnk->
link);
194 if (v_next != vn_curr->
prev) {
199 if (vn_curr->
pass != vn_next->
pass) {
201 if (vn_curr->
pass == -vn_next->
pass) {
214 vn_next->
prev = v_curr;
217 vn_next->
flag &= ~VNINFO_FLAG_IS_MIXFACE;
235 if (v_ls_tot == 1 && tot == 1) {
255 const uint path_cost_max,
268 uint path_cost_accum = 0;
278 vn_1->
pass = pass_nr;
279 vn_2->
pass = -pass_nr;
296 if (path_cost_accum >= path_cost_max) {
303 const LinkNode *v_ls_next_old = v_ls_next;
318 *r_path_len = path_len;
319 *r_path_cost = path_cost_accum;
324 if (v_ls_next_old != v_ls_next) {
333 v_ls_prev = v_ls_next;
363 e, *pass_nr, path_cost_max, r_path_len, &path_cost, vnet_info, path_pool);
366 if (path ==
nullptr) {
377 const uint path_len = *r_path_len;
382 for (v_lnk = path, i = 0; v_lnk; v_lnk = v_lnk->
next, i++) {
383 vert_arr[i] =
static_cast<BMVert *
>(v_lnk->
link);
386 i_prev = path_len - 1;
387 for (i = 0; i < path_len; i++) {
395 e_other, *pass_nr, path_cost, &path_len_test, &path_cost_test, vnet_info, path_pool);
403 *r_path_len = path_len_test;
404 *r_path_cost = path_cost_test;
405 path_cost = path_cost_test;
428 if (use_edge_tag ==
false) {
449 e, &pass_nr,
UINT_MAX, &path_len, &path_cost, vnet_info, path_pool);
460 }
while ((l_iter = l_iter->
next) != l_first);
462 if (use_new_face_tag) {
#define BLI_array_alloca(arr, realsize)
void BLI_linklist_free_pool(LinkNode *list, LinkNodeFreeFP freefunc, struct BLI_mempool *mempool)
void * BLI_linklist_pop_pool(LinkNode **listp, struct BLI_mempool *mempool) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BLI_linklist_reverse(LinkNode **listp) ATTR_NONNULL(1)
void void BLI_linklist_prepend_pool(LinkNode **listp, void *ptr, struct BLI_mempool *mempool) ATTR_NONNULL(1
#define BLI_linklist_prepend_alloca(listp, ptr)
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
int BLI_mempool_len(const BLI_mempool *pool) ATTR_NONNULL(1)
void BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1)
#define UNUSED_VARS_NDEBUG(...)
Read Guarded memory(de)allocation.
#define BM_FACE_FIRST_LOOP(p)
bool BM_edges_from_verts(BMEdge **edge_arr, BMVert **vert_arr, const int len)
BMFace * BM_face_create(BMesh *bm, BMVert *const *verts, BMEdge *const *edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
static int bm_edge_face(BMEdge *e)
static bool bm_edgenet_path_check_overlap(BMVert *v1, BMVert *v2, VertNetInfo *vnet_info)
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)
void BM_mesh_edgenet(BMesh *bm, const bool use_edge_tag, const bool use_new_face_tag)
static bool bm_edge_step_ok(BMEdge *e)
static BMEdge * bm_edgenet_edge_get_next(BMesh *bm, LinkNode **edge_queue, BLI_mempool *edge_queue_pool)
static BMFace * bm_edgenet_face_from_path(BMesh *bm, LinkNode *path, const uint path_len)
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)
static BMEdge * bm_edgenet_path_step(BMVert *v_curr, LinkNode **v_ls, VertNetInfo *vnet_info, BLI_mempool *path_pool)
#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)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
bool BM_face_exists_multi(BMVert **varr, BMEdge **earr, int len)
BMEdge * BM_edge_exists(BMVert *v_a, BMVert *v_b)
bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)