25 uint tot_edge_boundary = 0;
26 uint tot_edge_manifold = 0;
27 uint tot_edge_wire = 0;
51 if (((tot_edge == 4) && (tot_edge_boundary == 0) && (tot_edge_manifold == 4)) ||
52 ((tot_edge == 3) && (tot_edge_boundary == 0) && (tot_edge_manifold == 3)) ||
53 ((tot_edge == 3) && (tot_edge_boundary == 2) && (tot_edge_manifold == 1)))
59 else if ((tot_edge == 2) && (tot_edge_wire == 2)) {
80 uint tot_edge_boundary = 0;
81 uint tot_edge_manifold = 0;
82 uint tot_edge_wire = 0;
99 if (tot_edge_wire == 2) {
103 else if (tot_edge == 4) {
105 if (tot_edge_boundary == 0 && tot_edge_manifold == 4) {
110 else if (tot_edge == 3) {
112 if (tot_edge_boundary == 2 && tot_edge_manifold == 1) {
116 else if (tot_edge_boundary == 0 && tot_edge_manifold == 3) {
130 for (
i = 0;
i < tot_loop;
i++) {
171 const uint verts_start_num,
172 const int desired_tag,
174 uint &r_verts_tagged_num)
179 r_verts_tagged_num = 0;
181 for (
int i = 0;
i < verts_start_num;
i++) {
191 r_verts_tagged[r_verts_tagged_num++] = v_other;
207 uint verts_collapse_num = 0;
208 uint verts_ignore_num = 0;
216 if (tag_only ==
false) {
224 for (iter_step = 0; iter_step < iterations; iter_step++) {
226 bool verts_were_marked_for_dissolve =
false;
249 verts_ignore_num = 1;
261 if (verts_collapse_num == 0) {
264 verts_were_marked_for_dissolve =
true;
271 if (verts_ignore_num == 0) {
279 if (!verts_were_marked_for_dissolve) {
Read Guarded memory(de)allocation.
static bool bm_vert_dissolve_fan_test(BMVert *v)
static bool bm_vert_dissolve_fan(BMesh *bm, BMVert *v)
void BM_mesh_decimate_unsubdivide(BMesh *bm, const int iterations)
void BM_mesh_decimate_unsubdivide_ex(BMesh *bm, const int iterations, const bool tag_only)
static void bm_tag_untagged_neighbors(BMVert *verts_start[], const uint verts_start_num, const int desired_tag, BMVert *r_verts_tagged[], uint &r_verts_tagged_num)
#define BM_elem_index_get(ele)
#define BM_elem_flag_merge_into(ele, ele_a, ele_b)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
void * BM_iter_at_index(BMesh *bm, const char itype, void *data, int index)
int BM_iter_as_array(BMesh *bm, const char itype, void *data, void **array, const int len)
Iterator as Array.
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_MUTABLE(ele, ele_next, iter, bm, itype)
bool BM_vert_dissolve(BMesh *bm, BMVert *v)
Dissolve Vert.
BMEdge * BM_vert_collapse_edge(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool do_del, const bool kill_degenerate_faces, const bool kill_duplicate_faces)
Vert Collapse Faces.
BMFace * BM_face_split(BMesh *bm, BMFace *f, BMLoop *l_a, BMLoop *l_b, BMLoop **r_l, BMEdge *example, const bool no_double)
Face Split.
BMFace * BM_face_exists(BMVert *const *varr, int len)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_edge_is_boundary(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_edge_is_wire(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
ATTR_WARN_UNUSED_RESULT const BMVert * v
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)