|
Blender
V2.93
|
#include <limits.h>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "BLI_alloca.h"#include "BLI_astar.h"#include "BLI_bitmap.h"#include "BLI_math.h"#include "BLI_memarena.h"#include "BLI_polyfill_2d.h"#include "BLI_rand.h"#include "BLI_utildefines.h"#include "BKE_bvhutils.h"#include "BKE_customdata.h"#include "BKE_mesh.h"#include "BKE_mesh_mapping.h"#include "BKE_mesh_remap.h"#include "BKE_mesh_runtime.h"#include "BLI_strict_flags.h"Go to the source code of this file.
Classes | |
| struct | IslandResult |
Functions | |
Some generic helpers. | |
| static bool | mesh_remap_bvhtree_query_nearest (BVHTreeFromMesh *treedata, BVHTreeNearest *nearest, const float co[3], const float max_dist_sq, float *r_hit_dist) |
| static bool | mesh_remap_bvhtree_query_raycast (BVHTreeFromMesh *treedata, BVHTreeRayHit *rayhit, const float co[3], const float no[3], const float radius, const float max_dist, float *r_hit_dist) |
Auto-match. | |
Find transform of a mesh to get best match with another. | |
| float | BKE_mesh_remap_calc_difference_from_mesh (const SpaceTransform *space_transform, const MVert *verts_dst, const int numverts_dst, Mesh *me_src) |
| static void | mesh_calc_eigen_matrix (const MVert *verts, const float(*vcos)[3], const int numverts, float r_mat[4][4]) |
| void | BKE_mesh_remap_find_best_match_from_mesh (const MVert *verts_dst, const int numverts_dst, Mesh *me_src, SpaceTransform *r_space_transform) |
Variables | |
| static CLG_LogRef | LOG = {"bke.mesh"} |
Mesh to mesh mapping | |
| #define | MREMAP_RAYCAST_APPROXIMATE_NR 3 |
| #define | MREMAP_RAYCAST_APPROXIMATE_FAC 5.0f |
| #define | MREMAP_RAYCAST_TRI_SAMPLES_MIN 4 |
| #define | MREMAP_RAYCAST_TRI_SAMPLES_MAX 20 |
| #define | MREMAP_DEFAULT_BUFSIZE 32 |
| #define | POLY_UNSET 0 |
| #define | POLY_CENTER_INIT 1 |
| #define | POLY_COMPLETE 2 |
| #define | ASTAR_STEPS_MAX 64 |
| typedef struct IslandResult | IslandResult |
| void | BKE_mesh_remap_calc_source_cddata_masks_from_map_modes (const int UNUSED(vert_mode), const int UNUSED(edge_mode), const int loop_mode, const int UNUSED(poly_mode), CustomData_MeshMasks *r_cddata_mask) |
| void | BKE_mesh_remap_init (MeshPairRemap *map, const int items_num) |
| void | BKE_mesh_remap_free (MeshPairRemap *map) |
| static void | mesh_remap_item_define (MeshPairRemap *map, const int index, const float UNUSED(hit_dist), const int island, const int sources_num, const int *indices_src, const float *weights_src) |
| void | BKE_mesh_remap_item_define_invalid (MeshPairRemap *map, const int index) |
| static int | mesh_remap_interp_poly_data_get (const MPoly *mp, MLoop *mloops, const float(*vcos_src)[3], const float point[3], size_t *buff_size, float(**vcos)[3], const bool use_loops, int **indices, float **weights, const bool do_weights, int *r_closest_index) |
| void | BKE_mesh_remap_calc_verts_from_mesh (const int mode, const SpaceTransform *space_transform, const float max_dist, const float ray_radius, const MVert *verts_dst, const int numverts_dst, const bool UNUSED(dirty_nors_dst), Mesh *me_src, MeshPairRemap *r_map) |
| void | BKE_mesh_remap_calc_edges_from_mesh (const int mode, const SpaceTransform *space_transform, const float max_dist, const float ray_radius, const MVert *verts_dst, const int numverts_dst, const MEdge *edges_dst, const int numedges_dst, const bool UNUSED(dirty_nors_dst), Mesh *me_src, MeshPairRemap *r_map) |
| static void | mesh_island_to_astar_graph_edge_process (MeshIslandStore *islands, const int island_index, BLI_AStarGraph *as_graph, MVert *verts, MPoly *polys, MLoop *loops, const int edge_idx, BLI_bitmap *done_edges, MeshElemMap *edge_to_poly_map, const bool is_edge_innercut, const int *poly_island_index_map, float(*poly_centers)[3], unsigned char *poly_status) |
| static void | mesh_island_to_astar_graph (MeshIslandStore *islands, const int island_index, MVert *verts, MeshElemMap *edge_to_poly_map, const int numedges, MLoop *loops, MPoly *polys, const int numpolys, BLI_AStarGraph *r_as_graph) |
| static float | mesh_remap_calc_loops_astar_f_cost (BLI_AStarGraph *as_graph, BLI_AStarSolution *as_solution, BLI_AStarGNLink *link, const int node_idx_curr, const int node_idx_next, const int node_idx_dst) |
| void | BKE_mesh_remap_calc_loops_from_mesh (const int mode, const SpaceTransform *space_transform, const float max_dist, const float ray_radius, MVert *verts_dst, const int numverts_dst, MEdge *edges_dst, const int numedges_dst, MLoop *loops_dst, const int numloops_dst, MPoly *polys_dst, const int numpolys_dst, CustomData *ldata_dst, CustomData *pdata_dst, const bool use_split_nors_dst, const float split_angle_dst, const bool dirty_nors_dst, Mesh *me_src, MeshRemapIslandsCalc gen_islands_src, const float islands_precision_src, MeshPairRemap *r_map) |
| void | BKE_mesh_remap_calc_polys_from_mesh (const int mode, const SpaceTransform *space_transform, const float max_dist, const float ray_radius, MVert *verts_dst, const int numverts_dst, MLoop *loops_dst, const int numloops_dst, MPoly *polys_dst, const int numpolys_dst, CustomData *pdata_dst, const bool dirty_nors_dst, Mesh *me_src, MeshPairRemap *r_map) |
Functions for mapping data between meshes.
Definition in file mesh_remap.c.
| #define ASTAR_STEPS_MAX 64 |
Definition at line 1252 of file mesh_remap.c.
| #define MREMAP_DEFAULT_BUFSIZE 32 |
Definition at line 498 of file mesh_remap.c.
| #define MREMAP_RAYCAST_APPROXIMATE_FAC 5.0f |
Definition at line 491 of file mesh_remap.c.
| #define MREMAP_RAYCAST_APPROXIMATE_NR 3 |
However, in 'islands' case where each hit gets a weight, 'precise' hits should have a better weight than 'approximate' hits. To address that, we simplify things with:
This only concerns loops, currently (because of islands), and 'sampled' edges/polys norproj.
Definition at line 489 of file mesh_remap.c.
| #define MREMAP_RAYCAST_TRI_SAMPLES_MAX 20 |
Definition at line 495 of file mesh_remap.c.
| #define MREMAP_RAYCAST_TRI_SAMPLES_MIN 4 |
Definition at line 494 of file mesh_remap.c.
| #define POLY_CENTER_INIT 1 |
Definition at line 1065 of file mesh_remap.c.
| #define POLY_COMPLETE 2 |
Definition at line 1066 of file mesh_remap.c.
| #define POLY_UNSET 0 |
Definition at line 1064 of file mesh_remap.c.
| typedef struct IslandResult IslandResult |
Little helper when dealing with source islands
| float BKE_mesh_remap_calc_difference_from_mesh | ( | const SpaceTransform * | space_transform, |
| const MVert * | verts_dst, | ||
| const int | numverts_dst, | ||
| Mesh * | me_src | ||
| ) |
Compute a value of the difference between both given meshes. The smaller the result, the better the match.
We return the inverse of the average of the inversed shortest distance from each dst vertex to src ones. In other words, beyond a certain (relatively small) distance, all differences have more or less the same weight in final result, which allows to reduce influence of a few high differences, in favor of a global good matching.
Definition at line 136 of file mesh_remap.c.
References BKE_bvhtree_from_mesh_get(), BLI_space_transform_apply(), BVHTREE_FROM_VERTS, copy_v3_v3(), float(), BVHTreeNearest::index, mesh_remap_bvhtree_query_nearest(), NULL, and result.
Referenced by BKE_mesh_remap_find_best_match_from_mesh().
| void BKE_mesh_remap_calc_edges_from_mesh | ( | const int | mode, |
| const SpaceTransform * | space_transform, | ||
| const float | max_dist, | ||
| const float | ray_radius, | ||
| const MVert * | verts_dst, | ||
| const int | numverts_dst, | ||
| const MEdge * | edges_dst, | ||
| const int | numedges_dst, | ||
| const bool | UNUSEDdirty_nors_dst, | ||
| Mesh * | me_src, | ||
| MeshPairRemap * | r_map | ||
| ) |
Definition at line 722 of file mesh_remap.c.
References BKE_bvhtree_from_mesh_get(), BKE_mesh_edge_other_vert(), BKE_mesh_remap_init(), BKE_mesh_remap_item_define_invalid(), BKE_mesh_vert_coords_alloc(), BKE_mesh_vert_edge_map_create(), BLI_assert, BLI_space_transform_apply(), BLI_space_transform_apply_normal(), BVHTREE_FROM_EDGES, BVHTREE_FROM_LOOPTRI, BVHTREE_FROM_VERTS, CLAMP, CLOG_WARN, MVert::co, copy_v3_v3(), copy_vn_fl(), MeshElemMap::count, MLoop::e, float(), free_bvhtree_from_mesh(), BVHTreeNearest::index, BVHTreeRayHit::index, MeshElemMap::indices, indices, interp_v3_v3v3(), interp_v3_v3v3_slerp_safe(), isect_line_line_v3(), MeshPairRemap::items, len_squared_v3v3(), len_v3v3(), line_point_factor_v3(), LOG, MPoly::loopstart, BVHTreeFromMesh::looptri, Mesh::medge, MEM_freeN, MEM_mallocN, mesh_remap_bvhtree_query_nearest(), mesh_remap_bvhtree_query_raycast(), mesh_remap_item_define(), min_ii(), Mesh::mloop, Mesh::mpoly, MREMAP_MODE_EDGE, MREMAP_MODE_EDGE_EDGEINTERP_VNORPROJ, MREMAP_MODE_EDGE_NEAREST, MREMAP_MODE_EDGE_POLY_NEAREST, MREMAP_MODE_EDGE_VERT_NEAREST, MREMAP_MODE_TOPOLOGY, MREMAP_RAYCAST_APPROXIMATE_FAC, MREMAP_RAYCAST_APPROXIMATE_NR, MVert::no, normal_short_to_float_v3(), NULL, MLoopTri::poly, Mesh::totedge, MPoly::totloop, Mesh::totvert, v1, MEdge::v1, v2, MEdge::v2, and w().
| void BKE_mesh_remap_calc_loops_from_mesh | ( | const int | mode, |
| const SpaceTransform * | space_transform, | ||
| const float | max_dist, | ||
| const float | ray_radius, | ||
| MVert * | verts_dst, | ||
| const int | numverts_dst, | ||
| MEdge * | edges_dst, | ||
| const int | numedges_dst, | ||
| MLoop * | loops_dst, | ||
| const int | numloops_dst, | ||
| MPoly * | polys_dst, | ||
| const int | numpolys_dst, | ||
| CustomData * | ldata_dst, | ||
| CustomData * | pdata_dst, | ||
| const bool | use_split_nors_dst, | ||
| const float | split_angle_dst, | ||
| const bool | dirty_nors_dst, | ||
| Mesh * | me_src, | ||
| MeshRemapIslandsCalc | gen_islands_src, | ||
| const float | islands_precision_src, | ||
| MeshPairRemap * | r_map | ||
| ) |
Definition at line 1254 of file mesh_remap.c.
References ASTAR_STEPS_MAX, BKE_bvhtree_from_mesh_get(), BKE_mesh_calc_normals_poly(), BKE_mesh_calc_poly_center(), BKE_mesh_edge_poly_map_create(), BKE_mesh_loop_islands_free(), BKE_mesh_normals_loop_split(), BKE_mesh_origindex_map_create_looptri(), BKE_mesh_remap_init(), BKE_mesh_remap_item_define_invalid(), BKE_mesh_runtime_looptri_ensure(), BKE_mesh_vert_coords_alloc(), BKE_mesh_vert_loop_map_create(), BKE_mesh_vert_poly_map_create(), BLI_assert, BLI_astar_graph_free(), BLI_astar_graph_solve(), BLI_astar_solution_clear(), BLI_astar_solution_free(), BLI_astar_solution_init(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_bitmap_set_all(), BLI_BITMAP_TEST, BLI_space_transform_apply(), BLI_space_transform_apply_normal(), BVHTREE_FROM_LOOPTRI, bvhtree_from_mesh_looptri_ex(), bvhtree_from_mesh_verts_ex(), BVHTREE_FROM_VERTS, CD_CALLOC, CD_CUSTOMLOOPNORMAL, CD_FLAG_TEMPORARY, CD_NORMAL, closest_on_tri_to_point_v3(), BVHTreeNearest::co, BVHTreeRayHit::co, MVert::co, copy_v3_v3(), MeshElemMap::count, count, BLI_AStarGNLink::custom_data, BLI_AStarSolution::custom_data, BLI_AStarGraph::custom_data, CustomData_add_layer(), CustomData_get_layer(), CustomData_set_layer_flag(), dot(), dot_v3v3(), ELEM, IslandResult::factor, float(), free_bvhtree_from_mesh(), IslandResult::hit_dist, IslandResult::hit_point, if(), BVHTreeNearest::index, BVHTreeRayHit::index, IslandResult::index_src, MeshElemMap::indices, MeshIslandStore::innercut_type, MeshIslandStore::island_type, MeshIslandStore::islands, MeshIslandStore::islands_num, MeshIslandStore::item_type, MeshIslandStore::items_to_islands, Mesh::ldata, MLoopTri_Store::len, len_squared_v3v3(), MPoly::loopstart, BVHTreeFromMesh::looptri, Mesh_Runtime::looptris, max_ii(), Mesh::medge, MEM_callocN, MEM_freeN, MEM_mallocN, MEM_reallocN, mesh_island_to_astar_graph(), mesh_remap_bvhtree_query_nearest(), mesh_remap_bvhtree_query_raycast(), mesh_remap_calc_loops_astar_f_cost(), mesh_remap_interp_poly_data_get(), mesh_remap_item_define(), MISLAND_TYPE_EDGE, MISLAND_TYPE_LOOP, MISLAND_TYPE_POLY, Mesh::mloop, Mesh::mpoly, MREMAP_DEFAULT_BUFSIZE, MREMAP_MODE_LOOP, MREMAP_MODE_LOOP_NEAREST_LOOPNOR, MREMAP_MODE_LOOP_NEAREST_POLYNOR, MREMAP_MODE_LOOP_POLY_NEAREST, MREMAP_MODE_TOPOLOGY, MREMAP_RAYCAST_APPROXIMATE_FAC, MREMAP_RAYCAST_APPROXIMATE_NR, MREMAP_USE_LOOP, MREMAP_USE_NORMAL, MREMAP_USE_NORPROJ, MREMAP_USE_POLY, MREMAP_USE_VERT, Mesh::mvert, NULL, POINTER_AS_INT, POINTER_FROM_INT, MLoopTri::poly, BLI_AStarSolution::prev_links, BLI_AStarSolution::prev_nodes, Mesh::runtime, BLI_AStarSolution::steps, Mesh::totedge, Mesh::totloop, MPoly::totloop, Mesh::totpoly, Mesh::totvert, MLoopTri::tri, v, MLoop::v, and w().
| void BKE_mesh_remap_calc_polys_from_mesh | ( | const int | mode, |
| const SpaceTransform * | space_transform, | ||
| const float | max_dist, | ||
| const float | ray_radius, | ||
| MVert * | verts_dst, | ||
| const int | numverts_dst, | ||
| MLoop * | loops_dst, | ||
| const int | numloops_dst, | ||
| MPoly * | polys_dst, | ||
| const int | numpolys_dst, | ||
| CustomData * | pdata_dst, | ||
| const bool | dirty_nors_dst, | ||
| Mesh * | me_src, | ||
| MeshPairRemap * | r_map | ||
| ) |
Definition at line 2202 of file mesh_remap.c.
References area_poly_v2(), area_tri_v2(), axis_dominant_v3_to_m3(), BKE_bvhtree_from_mesh_get(), BKE_mesh_calc_normals_poly(), BKE_mesh_calc_poly_center(), BKE_mesh_remap_init(), BKE_mesh_remap_item_define_invalid(), BLI_assert, BLI_polyfill_calc(), BLI_rng_free(), BLI_rng_get_tri_sample_float_v2(), BLI_rng_new(), BLI_space_transform_apply(), BLI_space_transform_apply_normal(), BVHTREE_FROM_LOOPTRI, CD_CALLOC, CD_FLAG_TEMPORARY, CD_NORMAL, CLAMP, CLOG_WARN, MVert::co, copy_v3_v3(), copy_vn_fl(), CustomData_add_layer(), CustomData_get_layer(), CustomData_set_layer_flag(), float(), free_bvhtree_from_mesh(), BVHTreeNearest::index, BVHTreeRayHit::index, indices, INIT_MINMAX2, invert_m3_m3(), MeshPairRemap::items, LOG, MPoly::loopstart, BVHTreeFromMesh::looptri, max_ff(), max_ii(), MEM_freeN, MEM_mallocN, MEM_reallocN, mesh_remap_bvhtree_query_nearest(), mesh_remap_bvhtree_query_raycast(), mesh_remap_item_define(), minmax_v2v2_v2(), MREMAP_DEFAULT_BUFSIZE, MREMAP_MODE_POLY, MREMAP_MODE_POLY_NEAREST, MREMAP_MODE_POLY_NOR, MREMAP_MODE_POLY_POLYINTERP_PNORPROJ, MREMAP_MODE_TOPOLOGY, MREMAP_RAYCAST_APPROXIMATE_FAC, MREMAP_RAYCAST_APPROXIMATE_NR, MREMAP_RAYCAST_TRI_SAMPLES_MAX, MREMAP_RAYCAST_TRI_SAMPLES_MIN, MREMAP_USE_NORMAL, MREMAP_USE_NORPROJ, mul_m3_v3(), mul_v2_m3v3(), NULL, MLoopTri::poly, sub_v2_v2v2(), MPoly::totloop, Mesh::totpoly, UNLIKELY, MLoop::v, v1, v2, and w().
| void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes | ( | const int | UNUSEDvert_mode, |
| const int | UNUSEDedge_mode, | ||
| const int | loop_mode, | ||
| const int | UNUSEDpoly_mode, | ||
| CustomData_MeshMasks * | r_cddata_mask | ||
| ) |
Definition at line 334 of file mesh_remap.c.
References CD_MASK_NORMAL, CustomData_MeshMasks::lmask, MREMAP_USE_LOOP, MREMAP_USE_NORMAL, MREMAP_USE_POLY, and CustomData_MeshMasks::pmask.
| void BKE_mesh_remap_calc_verts_from_mesh | ( | const int | mode, |
| const SpaceTransform * | space_transform, | ||
| const float | max_dist, | ||
| const float | ray_radius, | ||
| const MVert * | verts_dst, | ||
| const int | numverts_dst, | ||
| const bool | UNUSEDdirty_nors_dst, | ||
| Mesh * | me_src, | ||
| MeshPairRemap * | r_map | ||
| ) |
Definition at line 500 of file mesh_remap.c.
References BKE_bvhtree_from_mesh_get(), BKE_mesh_remap_init(), BKE_mesh_remap_item_define_invalid(), BKE_mesh_vert_coords_alloc(), BLI_assert, BLI_space_transform_apply(), BLI_space_transform_apply_normal(), BVHTREE_FROM_EDGES, BVHTREE_FROM_LOOPTRI, BVHTREE_FROM_VERTS, CLAMP, CLOG_WARN, BVHTreeNearest::co, BVHTreeRayHit::co, copy_v3_v3(), ELEM, float(), free_bvhtree_from_mesh(), BVHTreeNearest::index, BVHTreeRayHit::index, indices, MeshPairRemap::items, len_squared_v3v3(), line_point_factor_v3(), LOG, BVHTreeFromMesh::looptri, Mesh::medge, MEM_freeN, MEM_mallocN, mesh_remap_bvhtree_query_nearest(), mesh_remap_bvhtree_query_raycast(), mesh_remap_interp_poly_data_get(), mesh_remap_item_define(), Mesh::mloop, Mesh::mpoly, MREMAP_DEFAULT_BUFSIZE, MREMAP_MODE_TOPOLOGY, MREMAP_MODE_VERT, MREMAP_MODE_VERT_EDGE_NEAREST, MREMAP_MODE_VERT_EDGEINTERP_NEAREST, MREMAP_MODE_VERT_NEAREST, MREMAP_MODE_VERT_POLY_NEAREST, MREMAP_MODE_VERT_POLYINTERP_NEAREST, MREMAP_MODE_VERT_POLYINTERP_VNORPROJ, normal_short_to_float_v3(), NULL, MLoopTri::poly, Mesh::totvert, MEdge::v1, and MEdge::v2.
| void BKE_mesh_remap_find_best_match_from_mesh | ( | const MVert * | verts_dst, |
| const int | numverts_dst, | ||
| Mesh * | me_src, | ||
| SpaceTransform * | r_space_transform | ||
| ) |
Set r_space_transform so that best bbox of dst matches best bbox of src.
Definition at line 274 of file mesh_remap.c.
References BKE_mesh_remap_calc_difference_from_mesh(), BKE_mesh_vert_coords_alloc(), BLI_space_transform_global_from_matrices(), copy_m4_m4(), float(), MEM_freeN, mesh_calc_eigen_matrix(), mul_v3_fl(), NULL, and Mesh::totvert.
| void BKE_mesh_remap_free | ( | MeshPairRemap * | map | ) |
Definition at line 365 of file mesh_remap.c.
References BLI_memarena_free(), MeshPairRemap::items, MeshPairRemap::items_num, MeshPairRemap::mem, and NULL.
Referenced by BKE_mesh_remap_init(), and BKE_object_data_transfer_ex().
| void BKE_mesh_remap_init | ( | MeshPairRemap * | map, |
| const int | items_num | ||
| ) |
Definition at line 353 of file mesh_remap.c.
References BKE_mesh_remap_free(), BLI_memarena_alloc(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, MeshPairRemap::items, MeshPairRemap::items_num, and MeshPairRemap::mem.
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), and BKE_mesh_remap_calc_verts_from_mesh().
| void BKE_mesh_remap_item_define_invalid | ( | MeshPairRemap * | map, |
| const int | index | ||
| ) |
Definition at line 406 of file mesh_remap.c.
References mesh_remap_item_define(), and NULL.
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), and BKE_mesh_remap_calc_verts_from_mesh().
|
static |
Definition at line 191 of file mesh_remap.c.
References BLI_assert, BLI_covariance_m3_v3n(), BLI_eigen_solve_selfadjoint_m3(), center, compare_ff_relative(), copy_m4_m3(), copy_v3_v3(), KDL::cos(), float(), MEM_freeN, MEM_mallocN, mul_v3_fl(), NULL, ortho_basis_v3v3_v3(), sqrtf_signed(), unit_m3(), unit_m4(), UNUSED_VARS_NDEBUG, and verts.
Referenced by BKE_mesh_remap_find_best_match_from_mesh().
|
static |
Definition at line 1127 of file mesh_remap.c.
References BLI_astar_graph_init(), BLI_BITMAP_NEW, BLI_BITMAP_TEST, BLI_memarena_calloc(), MeshElemMap::count, BLI_AStarGraph::custom_data, MLoop::e, float(), MeshElemMap::indices, MeshIslandStore::innercuts, MeshIslandStore::islands, MPoly::loopstart, BLI_AStarGraph::mem, MEM_callocN, MEM_freeN, mesh_island_to_astar_graph_edge_process(), NULL, POLY_COMPLETE, and verts.
Referenced by BKE_mesh_remap_calc_loops_from_mesh().
|
static |
Definition at line 1068 of file mesh_remap.c.
References BKE_mesh_calc_poly_center(), BLI_array_alloca, BLI_astar_node_init(), BLI_astar_node_link_add(), BLI_BITMAP_ENABLE, MeshElemMap::count, count, MeshElemMap::indices, MeshIslandStore::items_to_islands, len_v3v3(), MPoly::loopstart, POINTER_FROM_INT, POLY_CENTER_INIT, POLY_COMPLETE, POLY_UNSET, UNLIKELY, and verts.
Referenced by mesh_island_to_astar_graph().
|
static |
Definition at line 56 of file mesh_remap.c.
References BLI_bvhtree_find_nearest(), BVHTreeNearest::co, BVHTreeNearest::dist_sq, BVHTreeNearest::index, len_squared_v3v3(), BVHTreeFromMesh::nearest_callback, sqrtf, and BVHTreeFromMesh::tree.
Referenced by BKE_mesh_remap_calc_difference_from_mesh(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), and BKE_mesh_remap_calc_verts_from_mesh().
|
static |
Definition at line 85 of file mesh_remap.c.
References BLI_bvhtree_ray_cast(), BVHTreeRayHit::dist, BVHTreeRayHit::index, negate_v3_v3(), BVHTreeFromMesh::raycast_callback, and BVHTreeFromMesh::tree.
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), and BKE_mesh_remap_calc_verts_from_mesh().
|
static |
Definition at line 1225 of file mesh_remap.c.
References BLI_AStarGNLink::cost, BLI_AStarGNLink::custom_data, BLI_AStarGNode::custom_data, BLI_AStarSolution::custom_data, BLI_AStarSolution::g_costs, len_v3v3(), BLI_AStarGraph::nodes, POINTER_AS_INT, and POINTER_FROM_INT.
Referenced by BKE_mesh_remap_calc_loops_from_mesh().
|
static |
Definition at line 411 of file mesh_remap.c.
References copy_v3_v3(), float(), indices, interp_weights_poly_v3(), len_squared_v3v3(), MPoly::loopstart, MEM_reallocN, MPoly::totloop, and MLoop::v.
Referenced by BKE_mesh_remap_calc_loops_from_mesh(), and BKE_mesh_remap_calc_verts_from_mesh().
|
static |
Definition at line 376 of file mesh_remap.c.
References BLI_memarena_alloc(), MeshPairRemapItem::indices_src, MeshPairRemapItem::island, MeshPairRemap::items, MeshPairRemap::mem, NULL, MeshPairRemapItem::sources_num, and MeshPairRemapItem::weights_src.
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), BKE_mesh_remap_calc_verts_from_mesh(), and BKE_mesh_remap_item_define_invalid().
|
static |
Definition at line 50 of file mesh_remap.c.
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), and BKE_mesh_remap_calc_verts_from_mesh().