26 const short check_flag,
38 if (e_rotate !=
NULL) {
69 if ((e_iter_index != -1)) {
76 }
while ((l_iter = l_iter->
next) != l_radial_iter);
77 }
while ((l_radial_iter = l_radial_iter->
radial_next) !=
e->l);
86 BMesh *
bm,
BMOperator *op,
short check_flag,
const bool use_ccw,
const int edges_len)
90 int edges_len_rotate = 0;
107 eheap_table[i] =
NULL;
114 PASS_TYPE_BOUNDARY = 0,
118 uint pass_type = PASS_TYPE_BOUNDARY;
120 while ((pass_type != PASS_TYPE_DONE) && (edges_len_rotate != edges_len)) {
132 if (pass_type == PASS_TYPE_BOUNDARY) {
139 if (pass_type == PASS_TYPE_BOUNDARY) {
152 cost = cost != 0.0f ? -1.0f / cost : FLT_MAX;
164 const int edges_len_rotate_prev = edges_len_rotate;
172 if (e_rotate !=
NULL) {
178 edges_len_rotate += 1;
188 BMLoop *l_radial_iter = e_rotate->
l;
195 if ((e_iter_index != -1) && (eheap_table[e_iter_index] ==
NULL)) {
202 }
while ((l_iter = l_iter->
next) != l_radial_iter);
203 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_rotate->
l);
209 if (edges_len_rotate == edges_len_rotate_prev) {
225 const bool is_single = (edges_len == 1);
229 bool is_simple =
true;
230 if (is_single ==
false) {
241 if (is_simple ==
false) {
A min-heap / priority queue ADT.
void BLI_heap_free(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
void void bool BLI_heap_is_empty(const Heap *heap) ATTR_NONNULL(1)
void * BLI_heap_pop_min(Heap *heap) ATTR_NONNULL(1)
Heap * BLI_heap_new_ex(unsigned int reserve_num) ATTR_WARN_UNUSED_RESULT
HeapNode * BLI_heap_insert(Heap *heap, float value, void *ptr) ATTR_NONNULL(1)
Read Guarded memory(de)allocation.
#define BM_elem_index_get(ele)
#define BM_elem_index_set(ele, index)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
bool BM_edge_rotate_check(BMEdge *e)
Check if Rotate Edge is OK.
BMEdge * BM_edge_rotate(BMesh *bm, BMEdge *e, const bool ccw, const short check_flag)
Rotate Edge.
@ BM_EDGEROT_CHECK_EXISTS
@ BM_EDGEROT_CHECK_DEGENERATE
#define BMO_ITER_INDEX(ele, iter, slot_args, slot_name, restrict_flag, i_)
#define BMO_edge_flag_enable(bm, e, oflag)
void BMO_slot_buffer_from_enabled_flag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, char htype, short oflag)
#define BMO_face_flag_enable(bm, e, oflag)
#define BMO_ITER(ele, iter, slot_args, slot_name, restrict_flag)
int BMO_slot_buffer_len(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
#define BMO_face_flag_test(bm, e, oflag)
bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name)
float BM_edge_calc_length_squared(const BMEdge *e)
bool BM_edge_face_pair(BMEdge *e, BMFace **r_fa, BMFace **r_fb)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static float bm_edge_calc_rotate_cost(const BMEdge *e)
static void bm_rotate_edges_shared(BMesh *bm, BMOperator *op, short check_flag, const bool use_ccw, const int edges_len)
static void bm_rotate_edges_simple(BMesh *bm, BMOperator *op, const short check_flag, const bool use_ccw)
void bmo_rotate_edges_exec(BMesh *bm, BMOperator *op)
static float bm_edge_rotate_is_boundary(const BMEdge *e)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
struct BMLoop * radial_next
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]