|
Blender V5.0
|
Go to the source code of this file.
Enumerations | |
| enum | { VERT_INDEX_DO_COLLAPSE = -1 , VERT_INDEX_INIT = 0 , VERT_INDEX_IGNORE = 1 } |
Functions | |
| static bool | bm_vert_dissolve_fan_test (BMVert *v) |
| static bool | bm_vert_dissolve_fan (BMesh *bm, BMVert *v) |
| 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) |
| void | BM_mesh_decimate_unsubdivide_ex (BMesh *bm, const int iterations, const bool tag_only) |
| void | BM_mesh_decimate_unsubdivide (BMesh *bm, const int iterations) |
BMesh decimator that uses a grid un-subdivide method.
Definition in file bmesh_decimate_unsubdivide.cc.
| anonymous enum |
Note that bm_tag_untagged_neighbors requires VERT_INDEX_DO_COLLAPSE & VERT_INDEX_IGNORE are equal magnitude, opposite sign.
| Enumerator | |
|---|---|
| VERT_INDEX_DO_COLLAPSE | |
| VERT_INDEX_INIT | |
| VERT_INDEX_IGNORE | |
Definition at line 150 of file bmesh_decimate_unsubdivide.cc.
| void BM_mesh_decimate_unsubdivide | ( | BMesh * | bm, |
| const int | iterations ) |
Definition at line 298 of file bmesh_decimate_unsubdivide.cc.
References bm, and BM_mesh_decimate_unsubdivide_ex().
Referenced by modify_mesh().
| void BM_mesh_decimate_unsubdivide_ex | ( | BMesh * | bm, |
| int | iterations, | ||
| bool | tag_only ) |
| tag_only | so we can call this from an operator. |
Definition at line 201 of file bmesh_decimate_unsubdivide.cc.
References bm, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_index_get, BM_elem_index_set, BM_ELEM_TAG, BM_ITER_MESH, BM_ITER_MESH_MUTABLE, bm_tag_untagged_neighbors(), BM_VERT, bm_vert_dissolve_fan(), bm_vert_dissolve_fan_test(), BM_VERTS_OF_MESH, MEM_freeN(), MEM_malloc_arrayN(), v, VERT_INDEX_DO_COLLAPSE, VERT_INDEX_IGNORE, and VERT_INDEX_INIT.
Referenced by BM_mesh_decimate_unsubdivide(), and bmo_unsubdivide_exec().
|
static |
Given a set of starting verts, find all the currently-untagged neighbors of those verts, tag them with the specified value, and return an array specifying all the newly-tagged verts.
By using two arrays and two tag values, repeated alternating calls will expand the selection in an alternating tagging pattern. Dissolving one of the two tags will then reduce the density of the mesh, by half, in a regular diamond pattern.
| verts_start | The array of starting verts whose neighbors should be tagged. |
| verts_start_num | The number of verts in the verts_start array. |
| desired_tag | The value to set as a tag, on any currently-untagged neighbors. |
| r_verts_tagged | Returned array of all the verts which were tagged in this call. |
| r_verts_tagged_num | Returned number of verts in the r_verts_tagged array. |
Definition at line 170 of file bmesh_decimate_unsubdivide.cc.
References BLI_assert, BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_elem_index_get, BM_elem_index_set, BM_ITER_ELEM, e, i, v, and VERT_INDEX_INIT.
Referenced by BM_mesh_decimate_unsubdivide_ex().
Definition at line 65 of file bmesh_decimate_unsubdivide.cc.
References BLI_assert, bm, BM_edge_is_boundary(), BM_edge_is_manifold(), BM_edge_is_wire(), BM_EDGES_OF_VERT, BM_elem_flag_merge_into, BM_face_split(), BM_iter_as_array(), BM_iter_at_index(), BM_ITER_ELEM, BM_LOOPS_OF_VERT, BM_vert_collapse_edge(), BM_vert_dissolve(), BMLoop::e, e, i, l, and v.
Referenced by BM_mesh_decimate_unsubdivide_ex().
|
static |
Definition at line 16 of file bmesh_decimate_unsubdivide.cc.
References BM_edge_is_boundary(), BM_edge_is_manifold(), BM_edge_is_wire(), BM_edge_other_vert(), BM_EDGES_OF_VERT, BM_face_exists(), BM_ITER_ELEM, e, and v.
Referenced by BM_mesh_decimate_unsubdivide_ex().