Blender
V3.3
|
#include <cctype>
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include "MEM_guardedalloc.h"
#include "BLI_array.hh"
#include "BLI_index_range.hh"
#include "BLI_math_vec_types.hh"
#include "BLI_math_vector.h"
#include "BLI_span.hh"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_attribute.h"
#include "BKE_bvhutils.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_remesh_voxel.h"
#include "BKE_mesh_runtime.h"
#include "bmesh_tools.h"
Go to the source code of this file.
Functions | |
Mesh * | BKE_mesh_remesh_quadriflow (const Mesh *mesh, int target_faces, int seed, bool preserve_sharp, bool preserve_boundary, bool adaptive_scale, void(*update_cb)(void *, float progress, int *cancel), void *update_cb_data) |
Mesh * | BKE_mesh_remesh_voxel (const Mesh *mesh, const float voxel_size, const float adaptivity, const float isovalue) |
void | BKE_mesh_remesh_reproject_paint_mask (Mesh *target, Mesh *source) |
void | BKE_remesh_reproject_sculpt_face_sets (Mesh *target, Mesh *source) |
void | BKE_remesh_reproject_vertex_paint (Mesh *target, const Mesh *source) |
struct Mesh * | BKE_mesh_remesh_voxel_fix_poles (const Mesh *mesh) |
Mesh* BKE_mesh_remesh_quadriflow | ( | const Mesh * | mesh, |
int | target_faces, | ||
int | seed, | ||
bool | preserve_sharp, | ||
bool | preserve_boundary, | ||
bool | adaptive_scale, | ||
void(*)(void *, float progress, int *cancel) | update_cb, | ||
void * | update_cb_data | ||
) |
Definition at line 151 of file mesh_remesh_voxel.cc.
References mesh, seed, UNUSED_VARS, and update_cb().
Definition at line 278 of file mesh_remesh_voxel.cc.
References BKE_bvhtree_from_mesh_get(), BLI_bvhtree_find_nearest(), BVHTREE_FROM_VERTS, CD_CALLOC, CD_MVERT, CD_PAINT_MASK, copy_v3_v3(), CustomData_add_layer(), CustomData_get_layer(), CustomData_has_layer(), BVHTreeNearest::dist_sq, free_bvhtree_from_mesh(), BVHTreeNearest::index, BVHTreeFromMesh::nearest_callback, Mesh::totvert, BVHTreeFromMesh::tree, and Mesh::vdata.
Referenced by quadriflow_start_job(), and voxel_remesh_exec().
Mesh* BKE_mesh_remesh_voxel | ( | const Mesh * | mesh, |
const float | voxel_size, | ||
const float | adaptivity, | ||
const float | isovalue | ||
) |
Definition at line 264 of file mesh_remesh_voxel.cc.
References mesh, and UNUSED_VARS.
Definition at line 503 of file mesh_remesh_voxel.cc.
References add_v3_v3(), BKE_mesh_from_bmesh_nomain(), bm, BM_CREATE_NOP, BM_EDGE, BM_edge_collapse(), BM_edge_create(), BM_edge_exists(), BM_edge_face_count(), BM_edge_other_vert(), BM_EDGES_OF_MESH, BM_EDGES_OF_VERT, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, BM_face_kill(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_ITER_MESH_MUTABLE, BM_mesh_bm_from_me(), BM_mesh_create(), BM_mesh_delete_hflag_context(), BM_mesh_edgenet(), BM_mesh_elem_hflag_disable_all(), BM_mesh_elem_hflag_enable_all(), BM_mesh_free(), BM_mesh_normals_update(), BM_VERT, BM_vert_edge_count(), BM_VERTS_OF_FACE, BM_VERTS_OF_MESH, BMALLOC_TEMPLATE_FROM_ME, BMO_FLAG_DEFAULTS, BMO_FLAG_RESPECT_HIDE, BMO_op_callf(), BMeshFromMeshParams::calc_face_normal, BMeshToMeshParams::calc_object_remap, BMVert::co, copy_v3_v3(), DEL_VERTS, e, mesh, mid_v3_v3v3(), mul_v3_fl(), result, BMeshCreateParams::use_toolflags, v, BMEdge::v1, v1, BMEdge::v2, v2, and zero_v3().
Definition at line 316 of file mesh_remesh_voxel.cc.
References BKE_bvhtree_from_mesh_get(), BKE_mesh_calc_poly_center(), BKE_mesh_runtime_looptri_ensure(), BLI_bvhtree_find_nearest(), BVHTREE_FROM_LOOPTRI, CD_CALLOC, CD_MLOOP, CD_MPOLY, CD_MVERT, CD_SCULPT_FACE_SETS, CustomData_add_layer(), CustomData_get_layer(), CustomData_has_layer(), BVHTreeNearest::dist_sq, free_bvhtree_from_mesh(), BVHTreeNearest::index, Mesh::ldata, MPoly::loopstart, BVHTreeFromMesh::nearest_callback, Mesh::pdata, MLoopTri::poly, Mesh::totpoly, BVHTreeFromMesh::tree, and Mesh::vdata.
Referenced by voxel_remesh_exec().
Definition at line 363 of file mesh_remesh_voxel.cc.
References ATTR_DOMAIN_MASK_COLOR, ATTR_DOMAIN_POINT, BKE_bvhtree_from_mesh_get(), BKE_id_attribute_domain(), BKE_id_attribute_from_index(), BKE_id_attributes_active_color_get(), BKE_id_attributes_active_color_set(), BKE_id_attributes_color_find(), BKE_id_attributes_render_color_get(), BKE_id_attributes_render_color_set(), BKE_mesh_vert_loop_map_create(), BLI_bvhtree_find_nearest(), BVHTREE_FROM_VERTS, CD_CALLOC, CD_MASK_COLOR_ALL, CD_MLOOP, CD_MPOLY, CD_MVERT, MVert::co, MeshElemMap::count, CustomData_add_layer_named(), CustomData_get_layer(), CustomData_get_named_layer_index(), CustomData_interp(), CustomData_sizeof(), CustomDataLayer::data, BVHTreeNearest::dist_sq, free_bvhtree_from_mesh(), Mesh::id, BVHTreeNearest::index, MeshElemMap::indices, CustomData::layers, Mesh::ldata, MEM_SAFE_FREE, CustomDataLayer::name, BVHTreeFromMesh::nearest_callback, Mesh::pdata, POINTER_OFFSET, Mesh::totloop, Mesh::totpoly, Mesh::totvert, BVHTreeFromMesh::tree, CustomDataLayer::type, and Mesh::vdata.