Blender
V3.3
|
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_customdata.h"
#include "BKE_editmesh.h"
#include "BKE_editmesh_cache.h"
#include "BKE_mesh.h"
#include "BKE_mesh_iterators.h"
#include "BLI_bitmap.h"
#include "BLI_math.h"
#include "MEM_guardedalloc.h"
Go to the source code of this file.
Classes | |
struct | MappedVCosData |
Typedefs | |
typedef struct MappedVCosData | MappedVCosData |
Functions | |
void | BKE_mesh_foreach_mapped_vert (Mesh *mesh, void(*func)(void *userData, int index, const float co[3], const float no[3]), void *userData, MeshForeachFlag flag) |
void | BKE_mesh_foreach_mapped_edge (Mesh *mesh, const int tot_edges, void(*func)(void *userData, int index, const float v0co[3], const float v1co[3]), void *userData) |
void | BKE_mesh_foreach_mapped_loop (Mesh *mesh, void(*func)(void *userData, int vertex_index, int face_index, const float co[3], const float no[3]), void *userData, MeshForeachFlag flag) |
void | BKE_mesh_foreach_mapped_face_center (Mesh *mesh, void(*func)(void *userData, int index, const float cent[3], const float no[3]), void *userData, MeshForeachFlag flag) |
void | BKE_mesh_foreach_mapped_subdiv_face_center (Mesh *mesh, void(*func)(void *userData, int index, const float cent[3], const float no[3]), void *userData, MeshForeachFlag flag) |
static void | get_vertexcos__mapFunc (void *user_data, int index, const float co[3], const float UNUSED(no[3])) |
void | BKE_mesh_foreach_mapped_vert_coords_get (Mesh *me_eval, float(*r_cos)[3], const int totcos) |
Functions for iterating mesh features.
Definition in file mesh_iterators.c.
typedef struct MappedVCosData MappedVCosData |
void BKE_mesh_foreach_mapped_edge | ( | struct Mesh * | mesh, |
int | tot_edges, | ||
void(*)(void *userData, int index, const float v0co[3], const float v1co[3]) | func, | ||
void * | userData | ||
) |
Copied from #cdDM_foreachMappedEdge.
tot_edges | Number of original edges. Used to avoid calling the callback with invalid edge indices. |
Definition at line 93 of file mesh_iterators.c.
References BMEditMesh::bm, bm, BM_EDGES_OF_MESH, BM_elem_index_get, BM_ITER_MESH_INDEX, BM_mesh_elem_index_ensure(), BM_VERT, CD_ORIGINDEX, BMVert::co, CustomData_get_layer(), Mesh::edata, Mesh_Runtime::edit_data, Mesh::edit_mesh, float(), Mesh::medge, mesh, Mesh::mvert, NULL, ORIGINDEX_NONE, Mesh::runtime, Mesh::totedge, BMEdge::v1, MEdge::v1, BMEdge::v2, MEdge::v2, and EditMeshData::vertexCos.
Referenced by mesh_foreachScreenEdge(), and mesh_foreachScreenEdge_clip_bb_segment().
void BKE_mesh_foreach_mapped_face_center | ( | Mesh * | mesh, |
void(*)(void *userData, int index, const float cent[3], const float no[3]) | func, | ||
void * | userData, | ||
MeshForeachFlag | flag | ||
) |
Definition at line 224 of file mesh_iterators.c.
References BKE_editmesh_cache_ensure_poly_centers(), BKE_editmesh_cache_ensure_poly_normals(), BKE_mesh_calc_poly_center(), BKE_mesh_calc_poly_normal(), BMEditMesh::bm, bm, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, CD_ORIGINDEX, CustomData_get_layer(), Mesh_Runtime::edit_data, Mesh::edit_mesh, float(), MPoly::loopstart, mesh, MESH_FOREACH_USE_NORMAL, Mesh::mloop, Mesh::mpoly, Mesh::mvert, BMFace::no, NULL, ORIGINDEX_NONE, Mesh::pdata, EditMeshData::polyCos, EditMeshData::polyNos, Mesh::runtime, and Mesh::totpoly.
Referenced by mesh_foreachScreenFace().
void BKE_mesh_foreach_mapped_loop | ( | Mesh * | mesh, |
void(*)(void *userData, int vertex_index, int face_index, const float co[3], const float no[3]) | func, | ||
void * | userData, | ||
MeshForeachFlag | flag | ||
) |
Definition at line 144 of file mesh_iterators.c.
References BMEditMesh::bm, bm, BM_elem_index_get, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_mesh_elem_index_ensure(), BM_VERT, CD_NORMAL, CD_ORIGINDEX, BMVert::co, CustomData_get_layer(), Mesh_Runtime::edit_data, Mesh::edit_mesh, ELEM, float(), Mesh::ldata, mesh, MESH_FOREACH_USE_NORMAL, Mesh::mloop, Mesh::mpoly, Mesh::mvert, BMLoop::next, NULL, ORIGINDEX_NONE, Mesh::pdata, Mesh::runtime, MPoly::totloop, Mesh::totpoly, BMLoop::v, MLoop::v, Mesh::vdata, and EditMeshData::vertexCos.
void BKE_mesh_foreach_mapped_subdiv_face_center | ( | Mesh * | mesh, |
void(*)(void *userData, int index, const float cent[3], const float no[3]) | func, | ||
void * | userData, | ||
MeshForeachFlag | flag | ||
) |
Definition at line 300 of file mesh_iterators.c.
References BKE_mesh_vertex_normals_ensure(), BLI_assert, BLI_BITMAP_TEST, CD_ORIGINDEX, CustomData_get_layer(), float(), MPoly::loopstart, mesh, MESH_FOREACH_USE_NORMAL, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, ORIGINDEX_NONE, Mesh::pdata, Mesh::runtime, Mesh_Runtime::subsurf_face_dot_tags, MPoly::totloop, Mesh::totpoly, and MLoop::v.
Referenced by mesh_foreachScreenFace().
void BKE_mesh_foreach_mapped_vert | ( | Mesh * | mesh, |
void(*)(void *userData, int index, const float co[3], const float no[3]) | func, | ||
void * | userData, | ||
MeshForeachFlag | flag | ||
) |
Definition at line 33 of file mesh_iterators.c.
References BKE_editmesh_cache_ensure_vert_normals(), BKE_mesh_vertex_normals_ensure(), BMEditMesh::bm, bm, BM_ITER_MESH_INDEX, BM_VERTS_OF_MESH, CD_ORIGINDEX, BMVert::co, CustomData_get_layer(), Mesh_Runtime::edit_data, Mesh::edit_mesh, float(), mesh, MESH_FOREACH_USE_NORMAL, Mesh::mvert, BMVert::no, NULL, ORIGINDEX_NONE, Mesh::runtime, Mesh::totvert, Mesh::vdata, EditMeshData::vertexCos, and EditMeshData::vertexNos.
Referenced by BKE_editmesh_vert_coords_alloc(), BKE_mesh_foreach_mapped_vert_coords_get(), ED_mesh_pick_vert(), ED_transverts_create_from_obedit(), mesh_foreachScreenVert(), mesh_get_mapped_verts_coords(), meshobject_foreachScreenVert(), paint_weight_gradient_exec(), vpaint_proj_dm_map_cosnos_init(), and vpaint_proj_dm_map_cosnos_update().
void BKE_mesh_foreach_mapped_vert_coords_get | ( | Mesh * | me_eval, |
float(*) | r_cos[3], | ||
const int | totcos | ||
) |
Definition at line 370 of file mesh_iterators.c.
References BKE_mesh_foreach_mapped_vert(), BLI_BITMAP_NEW, get_vertexcos__mapFunc(), MEM_freeN, MESH_FOREACH_NOP, and user_data.
Referenced by add_verts_to_dgroups().
|
static |
Definition at line 354 of file mesh_iterators.c.
References BLI_BITMAP_ENABLE, BLI_BITMAP_TEST, copy_v3_v3(), user_data, MappedVCosData::vertex_visit, and MappedVCosData::vertexcos.
Referenced by BKE_mesh_foreach_mapped_vert_coords_get().