32 #define EDGE_OUT (1 << 0)
33 #define FACE_OUT (1 << 1)
37 const BMEdge *e_a = *(
const void **)a_;
38 const BMEdge *e_b = *(
const void **)b_;
47 if (e_a_concave < e_b_concave) {
50 if (e_a_concave > e_b_concave) {
57 if (e_a_len < e_b_len) {
60 if (e_a_len > e_b_len) {
73 const int f_base_len = f_base->
len;
74 int faces_array_tot = f_base_len - 3;
75 int edges_array_tot = f_base_len - 3;
78 const int quad_method = 0, ngon_method = 0;
101 if (faces_array_tot) {
103 for (i = 0; i < faces_array_tot; i++) {
104 BMFace *f = faces_array[i];
110 if (edges_array_tot) {
115 for (i = 0; i < edges_array_tot; i++) {
123 for (j = 0; j < 2; j++) {
141 BMFace *f_new, *f_pair[2] = {l_pair[0]->
f, l_pair[1]->
f};
153 while (faces_double) {
165 bool is_concave =
false;
167 const BMLoop *l_iter, *l_first;
178 }
while ((l_iter = l_iter->
next) != l_first);
187 bool changed =
false;
#define BLI_array_alloca(arr, realsize)
A min-heap / priority queue ADT.
void BLI_heap_free(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
Heap * BLI_heap_new_ex(unsigned int reserve_num) ATTR_WARN_UNUSED_RESULT
void BLI_heap_clear(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
void cross_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1)
struct MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
#define BLI_POLYFILL_ARENA_SIZE
#define BLI_POLYFILL_ALLOC_NGON_RESERVE
Read Guarded memory(de)allocation.
#define BM_FACE_FIRST_LOOP(p)
BMFace * BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
Join Connected Faces.
void BM_face_kill(BMesh *bm, BMFace *f)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
ATTR_WARN_UNUSED_RESULT BMesh * bm
#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)
void BM_face_triangulate(BMesh *bm, BMFace *f, BMFace **r_faces_new, int *r_faces_new_tot, BMEdge **r_edges_new, int *r_edges_new_tot, LinkNode **r_faces_double, const int quad_method, const int ngon_method, const bool use_tag, MemArena *pf_arena, struct Heap *pf_heap)
bool BM_edge_loop_pair(BMEdge *e, BMLoop **r_la, BMLoop **r_lb)
float BM_edge_calc_length_squared(const BMEdge *e)
bool BM_loop_is_convex(const BMLoop *l)
BLI_INLINE bool BM_edge_is_contiguous(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static bool bm_face_convex_tag_verts(BMFace *f)
void bmo_connect_verts_concave_exec(BMesh *bm, BMOperator *op)
static bool bm_face_split_by_concave(BMesh *bm, BMFace *f_base, const float eps, MemArena *pf_arena, struct Heap *pf_heap)
static int bm_edge_length_cmp(const void *a_, const void *b_)
IconTextureDrawCall normal
void(* MEM_freeN)(void *vmemh)
vec_base< T, 3 > cross(const vec_base< T, 3 > &a, const vec_base< T, 3 > &b)
struct BMLoop * radial_next
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]