|
Blender
V2.93
|
#include "atomic_ops.h"#include "MEM_guardedalloc.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "BLI_math_geom.h"#include "BLI_threads.h"#include "BKE_bvhutils.h"#include "BKE_lib_id.h"#include "BKE_mesh.h"#include "BKE_mesh_runtime.h"#include "BKE_shrinkwrap.h"#include "BKE_subdiv_ccg.h"#include "BLI_dynstr.h"Go to the source code of this file.
Mesh Batch Cache Callbacks | |
| void(* | BKE_mesh_batch_cache_dirty_tag_cb )(Mesh *me, eMeshBatchDirtyMode mode) = NULL |
| void(* | BKE_mesh_batch_cache_free_cb )(Mesh *me) = NULL |
| void | BKE_mesh_batch_cache_dirty_tag (Mesh *me, eMeshBatchDirtyMode mode) |
| void | BKE_mesh_batch_cache_free (Mesh *me) |
| void BKE_mesh_batch_cache_dirty_tag | ( | Mesh * | me, |
| eMeshBatchDirtyMode | mode | ||
| ) |
Definition at line 251 of file mesh_runtime.c.
References Mesh_Runtime::batch_cache, BKE_mesh_batch_cache_dirty_tag_cb, and Mesh::runtime.
Referenced by BKE_object_batch_cache_dirty_tag(), BKE_object_data_select_update(), geometry_extract_apply(), paint_mask_slice_exec(), paintface_flush_flags(), paintvert_flush_flags(), quadriflow_start_job(), sculpt_face_set_edit_modify_geometry(), sculpt_gesture_trim_end(), sculpt_symmetrize_exec(), shade_smooth_exec(), tag_object_after_update(), uv_select_tag_update_for_object(), uv_shortest_path_pick_ex(), voxel_remesh_exec(), vpaint_mode_toggle_exec(), vpaint_stroke_update_step(), and wpaint_stroke_update_step().
| void BKE_mesh_batch_cache_free | ( | Mesh * | me | ) |
Definition at line 257 of file mesh_runtime.c.
References Mesh_Runtime::batch_cache, BKE_mesh_batch_cache_free_cb, and Mesh::runtime.
Referenced by BKE_mesh_runtime_clear_cache().
| void BKE_mesh_runtime_clear_cache | ( | Mesh * | mesh | ) |
Definition at line 75 of file mesh_runtime.c.
References BKE_id_free(), BKE_mesh_batch_cache_free(), BKE_mesh_runtime_clear_edit_data(), BKE_mesh_runtime_clear_geometry(), BLI_mutex_end(), Mesh::edit_mesh, Mesh_Runtime::eval_mutex, MEM_freeN, mesh, Mesh_Runtime::mesh_eval, NULL, and Mesh::runtime.
Referenced by BKE_mesh_clear_geometry(), and mesh_free_data().
| bool BKE_mesh_runtime_clear_edit_data | ( | Mesh * | mesh | ) |
Definition at line 213 of file mesh_runtime.c.
References BKE_mesh_runtime_reset_edit_data(), Mesh_Runtime::edit_data, MEM_freeN, mesh, NULL, and Mesh::runtime.
Referenced by BKE_mesh_runtime_clear_cache().
| void BKE_mesh_runtime_clear_geometry | ( | Mesh * | mesh | ) |
Definition at line 226 of file mesh_runtime.c.
References MLoopTri_Store::array, BKE_shrinkwrap_discard_boundary_data(), BKE_subdiv_ccg_destroy(), Mesh_Runtime::bvh_cache, bvhcache_free(), Mesh_Runtime::looptris, MEM_SAFE_FREE, mesh, NULL, Mesh::runtime, and Mesh_Runtime::subdiv_ccg.
Referenced by BKE_mesh_nomain_to_mesh(), BKE_mesh_runtime_clear_cache(), BM_mesh_bm_to_me(), quadriflow_start_job(), and voxel_remesh_exec().
| char* BKE_mesh_runtime_debug_info | ( | Mesh * | me_eval | ) |
Definition at line 302 of file mesh_runtime.c.
References BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), Mesh_Runtime::deformed_only, DM_TYPE_CCGDM, DM_TYPE_CDDM, Mesh::fdata, Mesh::ldata, mesh_runtime_debug_info_layers(), ret, Mesh::runtime, Mesh::totedge, Mesh::totface, Mesh::totpoly, Mesh::totvert, and Node::type.
Referenced by BKE_mesh_runtime_debug_print().
| void BKE_mesh_runtime_debug_print | ( | Mesh * | me_eval | ) |
Definition at line 357 of file mesh_runtime.c.
References BKE_mesh_runtime_debug_info(), MEM_freeN, and str.
| void BKE_mesh_runtime_debug_print_cdlayers | ( | CustomData * | data | ) |
Definition at line 366 of file mesh_runtime.c.
References CustomData_file_write_info(), CustomData_layertype_name(), CustomData_sizeof(), data, CustomDataLayer::data, MEM_allocN_len, size(), and CustomDataLayer::type.
| bool BKE_mesh_runtime_ensure_edit_data | ( | struct Mesh * | mesh | ) |
Definition at line 188 of file mesh_runtime.c.
References Mesh_Runtime::edit_data, MEM_callocN, mesh, NULL, and Mesh::runtime.
Referenced by BKE_mesh_wrapper_from_editmesh_with_coords(), and editbmesh_calc_modifiers().
| bool BKE_mesh_runtime_is_valid | ( | Mesh * | me_eval | ) |
Definition at line 392 of file mesh_runtime.c.
References BKE_mesh_validate_all_customdata(), BKE_mesh_validate_arrays(), BLI_assert, Mesh::dvert, Mesh::id, is_valid, Mesh::ldata, Mesh::medge, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::mvert, ID::name, Mesh::totedge, Mesh::totface, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Definition at line 155 of file mesh_runtime.c.
References MLoopTri_Store::array, BKE_mesh_runtime_looptri_len(), BKE_mesh_runtime_looptri_recalc(), BLI_assert, BLI_mutex_lock(), BLI_mutex_unlock(), Mesh_Runtime::eval_mutex, MLoopTri_Store::len, Mesh_Runtime::looptris, mesh, NULL, and Mesh::runtime.
Referenced by BKE_bvhtree_from_mesh_get(), BKE_editmesh_looptri_calc(), BKE_mesh_calc_loop_tangents(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_remesh_reproject_sculpt_face_sets(), C_BVHTree_FromObject(), cloth_from_mesh(), deformVerts(), dynamicPaint_createUVSurface(), dynamicPaint_paintMesh(), dynamicPaint_setInitialColor(), blender::nodes::get_mesh_looptris(), harmonic_coordinates_bind(), imapaint_pick_uv(), initSystem(), proj_paint_state_mesh_eval_init(), raycastMesh(), RE_bake_pixels_populate_from_objects(), shrinkwrap_build_boundary_data(), snapMesh(), and surfacedeformBind().
| int BKE_mesh_runtime_looptri_len | ( | const Mesh * | mesh | ) |
Definition at line 147 of file mesh_runtime.c.
References BLI_assert, ELEM, MLoopTri_Store::len, Mesh_Runtime::looptris, mesh, poly_to_tri_count(), Mesh::runtime, Mesh::totloop, and Mesh::totpoly.
Referenced by BKE_mesh_runtime_looptri_ensure().
| void BKE_mesh_runtime_looptri_recalc | ( | Mesh * | mesh | ) |
Definition at line 127 of file mesh_runtime.c.
References MLoopTri_Store::array, MLoopTri_Store::array_wip, atomic_cas_ptr(), BKE_mesh_recalc_looptri(), BLI_assert, Mesh_Runtime::looptris, mesh, mesh_ensure_looptri_data(), Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, Mesh::runtime, Mesh::totloop, and Mesh::totpoly.
Referenced by BKE_mesh_runtime_looptri_ensure().
| void BKE_mesh_runtime_reset | ( | Mesh * | mesh | ) |
Default values defined at read time.
Definition at line 49 of file mesh_runtime.c.
References BLI_mutex_init(), Mesh_Runtime::eval_mutex, MEM_mallocN, mesh, and Mesh::runtime.
Referenced by mesh_blend_read_data(), and mesh_init_data().
| bool BKE_mesh_runtime_reset_edit_data | ( | Mesh * | mesh | ) |
Definition at line 198 of file mesh_runtime.c.
References Mesh_Runtime::edit_data, MEM_SAFE_FREE, mesh, NULL, EditMeshData::polyCos, EditMeshData::polyNos, Mesh::runtime, EditMeshData::vertexCos, and EditMeshData::vertexNos.
Referenced by BKE_mesh_runtime_clear_edit_data(), and editbmesh_calc_modifiers().
| void BKE_mesh_runtime_reset_on_copy | ( | Mesh * | mesh, |
| const int | UNUSEDflag | ||
| ) |
Definition at line 59 of file mesh_runtime.c.
References Mesh_Runtime::batch_cache, BLI_mutex_init(), Mesh_Runtime::bvh_cache, Mesh_Runtime::edit_data, Mesh_Runtime::eval_mutex, Mesh_Runtime::looptris, MEM_mallocN, mesh, Mesh_Runtime::mesh_eval, NULL, Mesh::runtime, Mesh_Runtime::shrinkwrap_data, and Mesh_Runtime::subdiv_ccg.
| void BKE_mesh_runtime_verttri_from_looptri | ( | MVertTri * | r_verttri, |
| const MLoop * | mloop, | ||
| const MLoopTri * | looptri, | ||
| int | looptri_num | ||
| ) |
Definition at line 176 of file mesh_runtime.c.
References MLoopTri::tri, MVertTri::tri, and MLoop::v.
|
static |
Ensure the array is large enough
Definition at line 99 of file mesh_runtime.c.
References MLoopTri_Store::array, MLoopTri_Store::array_wip, BLI_assert, MLoopTri_Store::len, MLoopTri_Store::len_alloc, Mesh_Runtime::looptris, MEM_malloc_arrayN, MEM_SAFE_FREE, mesh, NULL, poly_to_tri_count(), Mesh::runtime, SWAP, Mesh::totloop, and Mesh::totpoly.
Referenced by BKE_mesh_runtime_looptri_recalc().
|
static |
Definition at line 275 of file mesh_runtime.c.
References BLI_dynstr_appendf(), CD_NUMTYPES, CustomData_file_write_info(), CustomData_get_layer(), CustomData_has_layer(), CustomData_layertype_name(), CustomData_sizeof(), MEM_allocN_len, size(), and type.
Referenced by BKE_mesh_runtime_debug_info().
| void(* BKE_mesh_batch_cache_dirty_tag_cb) (Mesh *me, eMeshBatchDirtyMode mode) | ( | Mesh * | me, |
| eMeshBatchDirtyMode | mode | ||
| ) | = NULL |
Definition at line 248 of file mesh_runtime.c.
Referenced by BKE_mesh_batch_cache_dirty_tag(), and DRW_engines_register().
Definition at line 249 of file mesh_runtime.c.
Referenced by BKE_mesh_batch_cache_free(), and DRW_engines_register().