Blender  V3.3
Functions
bmesh_decimate.h File Reference

Go to the source code of this file.

Functions

void BM_mesh_decimate_collapse (BMesh *bm, float factor, float *vweights, float vweight_factor, bool do_triangulate, int symmetry_axis, float symmetry_eps)
 BM_mesh_decimate. More...
 
void BM_mesh_decimate_unsubdivide_ex (BMesh *bm, int iterations, bool tag_only)
 
void BM_mesh_decimate_unsubdivide (BMesh *bm, int iterations)
 
void BM_mesh_decimate_dissolve_ex (BMesh *bm, float angle_limit, bool do_dissolve_boundaries, BMO_Delimit delimit, BMVert **vinput_arr, int vinput_len, BMEdge **einput_arr, int einput_len, short oflag_out)
 
void BM_mesh_decimate_dissolve (BMesh *bm, float angle_limit, bool do_dissolve_boundaries, const BMO_Delimit delimit)
 

Function Documentation

◆ BM_mesh_decimate_collapse()

void BM_mesh_decimate_collapse ( BMesh bm,
float  factor,
float vweights,
float  vweight_factor,
bool  do_triangulate,
int  symmetry_axis,
float  symmetry_eps 
)

BM_mesh_decimate.

Parameters
bmThe mesh
factorface count multiplier [0 - 1]
vweightsOptional array of vertex aligned weights [0 - 1], a vertex group is the usual source for this.
symmetry_axisAxis of symmetry, -1 to disable mirror decimate.
symmetry_epsThreshold when matching mirror verts.
Note
The caller is responsible for recalculating face and vertex normals.
  • Vertex normals are maintained while decimating, although they won't necessarily match the final recalculated normals.
  • Face normals are not maintained at all.
Note
  • eheap_table[e_index_mirr] is only removed from the heap at the last moment since its possible (in theory) for collapsing e to remove e_mirr.
  • edges sharing a vertex are ignored, so the pivot vertex isn't moved to one side.

Definition at line 1264 of file bmesh_decimate_collapse.c.

References BLI_assert, BLI_heap_free(), BLI_heap_is_empty(), BLI_heap_new_ex(), BLI_heap_node_ptr(), BLI_heap_pop_min(), BLI_heap_remove(), BLI_heap_top_value(), bm, BM_ALL, bm_decim_build_edge_cost(), bm_decim_build_quadrics(), bm_decim_calc_target_co_fl(), bm_decim_edge_collapse(), bm_decim_invalid_edge_cost_single(), bm_decim_triangulate_begin(), bm_decim_triangulate_end(), bm_edge_collapse_is_degenerate_flip(), bm_edge_collapse_is_degenerate_topology(), BM_edge_share_vert_check(), bm_edge_symmetry_map(), BM_elem_index_get, CD_DO_EDGE, CD_DO_LOOP, CD_DO_VERT, COST_INVALID, CustomData_has_interp(), CustomData_has_math(), e, BMesh::edata, BMesh::elem_index_dirty, invalidate(), BMesh::ldata, LIKELY, MEM_callocN, MEM_freeN, MEM_mallocN, NULL, BMesh::totedge, BMesh::totface, BMesh::totvert, UNLIKELY, UNUSED_VARS, USE_SYMMETRY, BMesh::vdata, and void.

Referenced by edbm_decimate_exec(), and modifyMesh().

◆ BM_mesh_decimate_dissolve()

void BM_mesh_decimate_dissolve ( BMesh bm,
float  angle_limit,
bool  do_dissolve_boundaries,
const BMO_Delimit  delimit 
)

◆ BM_mesh_decimate_dissolve_ex()

void BM_mesh_decimate_dissolve_ex ( BMesh bm,
float  angle_limit,
bool  do_dissolve_boundaries,
BMO_Delimit  delimit,
BMVert **  vinput_arr,
int  vinput_len,
BMEdge **  einput_arr,
int  einput_len,
short  oflag_out 
)

◆ BM_mesh_decimate_unsubdivide()

void BM_mesh_decimate_unsubdivide ( BMesh bm,
int  iterations 
)

Definition at line 331 of file bmesh_decimate_unsubdivide.c.

References bm, and BM_mesh_decimate_unsubdivide_ex().

Referenced by modifyMesh().

◆ BM_mesh_decimate_unsubdivide_ex()

void BM_mesh_decimate_unsubdivide_ex ( BMesh bm,
int  iterations,
bool  tag_only 
)