Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_meshdata_types.h"
#include "BLI_alloca.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_memarena.h"
#include "BLI_task.h"
#include "BKE_customdata.h"
#include "BKE_multires.h"
#include "bmesh.h"
#include "intern/bmesh_private.h"
Go to the source code of this file.
Classes | |
struct | BMLoopInterpMultiresData |
struct | LoopWalkCtx |
struct | LoopGroupCD |
Typedefs | |
typedef struct BMLoopInterpMultiresData | BMLoopInterpMultiresData |
Functions | |
static void | bm_data_interp_from_elem (CustomData *data_layer, const BMElem *ele_src_1, const BMElem *ele_src_2, BMElem *ele_dst, const float fac) |
void | BM_data_interp_from_verts (BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v_dst, const float fac) |
Data, Interpolate From Verts. More... | |
void | BM_data_interp_from_edges (BMesh *bm, const BMEdge *e_src_1, const BMEdge *e_src_2, BMEdge *e_dst, const float fac) |
Data, Interpolate From Edges. More... | |
static void UNUSED_FUNCTION() | BM_Data_Vert_Average (BMesh *UNUSED(bm), BMFace *UNUSED(f)) |
Data Vert Average. More... | |
void | BM_data_interp_face_vert_edge (BMesh *bm, const BMVert *v_src_1, const BMVert *UNUSED(v_src_2), BMVert *v, BMEdge *e, const float fac) |
void | BM_face_interp_from_face_ex (BMesh *bm, BMFace *f_dst, const BMFace *f_src, const bool do_vertex, const void **blocks_l, const void **blocks_v, float(*cos_2d)[2], float axis_mat[3][3]) |
Data Interpolate From Face. More... | |
void | BM_face_interp_from_face (BMesh *bm, BMFace *f_dst, const BMFace *f_src, const bool do_vertex) |
static int | compute_mdisp_quad (const BMLoop *l, const float l_f_center[3], float v1[3], float v2[3], float v3[3], float v4[3], float e1[3], float e2[3]) |
Multires Interpolation. More... | |
static bool | quad_co (const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float p[3], const float n[3], float r_uv[2]) |
static void | mdisp_axis_from_quad (const float v1[3], const float v2[3], float UNUSED(v3[3]), const float v4[3], float r_axis_x[3], float r_axis_y[3]) |
static bool | mdisp_in_mdispquad (BMLoop *l_src, BMLoop *l_dst, const float l_dst_f_center[3], const float p[3], int res, float r_axis_x[3], float r_axis_y[3], float r_uv[2]) |
static float | bm_loop_flip_equotion (float mat[2][2], float b[2], const float target_axis_x[3], const float target_axis_y[3], const float coord[3], int i, int j) |
static void | bm_loop_flip_disp (const float source_axis_x[3], const float source_axis_y[3], const float target_axis_x[3], const float target_axis_y[3], float disp[3]) |
static void | loop_interp_multires_cb (void *__restrict userdata, const int ix, const TaskParallelTLS *__restrict UNUSED(tls)) |
void | BM_loop_interp_multires_ex (BMesh *UNUSED(bm), BMLoop *l_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset) |
void | BM_loop_interp_multires (BMesh *bm, BMLoop *l_dst, const BMFace *f_src) |
void | BM_face_interp_multires_ex (BMesh *bm, BMFace *f_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset) |
void | BM_face_interp_multires (BMesh *bm, BMFace *f_dst, const BMFace *f_src) |
void | BM_face_multires_bounds_smooth (BMesh *bm, BMFace *f) |
void | BM_loop_interp_from_face (BMesh *bm, BMLoop *l_dst, const BMFace *f_src, const bool do_vertex, const bool do_multires) |
void | BM_vert_interp_from_face (BMesh *bm, BMVert *v_dst, const BMFace *f_src) |
static void | update_data_blocks (BMesh *bm, CustomData *olddata, CustomData *data) |
void | BM_data_layer_add (BMesh *bm, CustomData *data, int type) |
void | BM_data_layer_add_named (BMesh *bm, CustomData *data, int type, const char *name) |
void | BM_data_layer_free (BMesh *bm, CustomData *data, int type) |
bool | BM_data_layer_free_named (BMesh *bm, CustomData *data, const char *name) |
void | BM_data_layer_free_n (BMesh *bm, CustomData *data, int type, int n) |
void | BM_data_layer_copy (BMesh *bm, CustomData *data, int type, int src_n, int dst_n) |
float | BM_elem_float_data_get (CustomData *cd, void *element, int type) |
void | BM_elem_float_data_set (CustomData *cd, void *element, int type, const float val) |
Loop interpolation functions: BM_vert_loop_groups_data_layer_*** | |
Handling loop custom-data such as UV's, while keeping contiguous fans is rather tedious. Especially when a verts loops can have multiple CustomData layers, and each layer can have multiple (different) contiguous fans. Said differently, a single vertices loops may span multiple UV islands. These functions snapshot vertices loops, storing each contiguous fan in its own group. The caller can manipulate the loops, then re-combine the CustomData values. While these functions don't explicitly handle multiple layers at once, the caller can simply store its own list.
| |
static void | bm_loop_walk_add (struct LoopWalkCtx *lwc, BMLoop *l) |
static void | bm_loop_walk_data (struct LoopWalkCtx *lwc, BMLoop *l_walk) |
LinkNode * | BM_vert_loop_groups_data_layer_create (BMesh *bm, BMVert *v, const int layer_n, const float *loop_weights, MemArena *arena) |
static void | bm_vert_loop_groups_data_layer_merge__single (BMesh *bm, void *lf_p, int layer_n, void *data_tmp) |
static void | bm_vert_loop_groups_data_layer_merge_weights__single (BMesh *bm, void *lf_p, const int layer_n, void *data_tmp, const float *loop_weights) |
void | BM_vert_loop_groups_data_layer_merge (BMesh *bm, LinkNode *groups, const int layer_n) |
void | BM_vert_loop_groups_data_layer_merge_weights (BMesh *bm, LinkNode *groups, const int layer_n, const float *loop_weights) |
Functions for interpolating data across the surface of a mesh.
Definition in file bmesh_interp.c.
typedef struct BMLoopInterpMultiresData BMLoopInterpMultiresData |
void BM_data_interp_face_vert_edge | ( | BMesh * | bm, |
const BMVert * | v_src_1, | ||
const BMVert * | UNUSEDv_src_2, | ||
BMVert * | v, | ||
BMEdge * | e, | ||
const float | fac | ||
) |
Definition at line 93 of file bmesh_interp.c.
References bm, CustomData_bmesh_interp(), BMHeader::data, e, BMLoop::head, BMesh::ldata, BMLoop::next, NULL, BMLoop::prev, BMLoop::radial_next, src, BMLoop::v, v, and w().
Referenced by BM_edge_split().
void BM_data_interp_from_edges | ( | BMesh * | bm, |
const BMEdge * | e_src_1, | ||
const BMEdge * | e_src_2, | ||
BMEdge * | e_dst, | ||
float | fac | ||
) |
Data, Interpolate From Edges.
Interpolates per-edge data from two sources to e_dst.
Definition at line 75 of file bmesh_interp.c.
References bm, bm_data_interp_from_elem(), and BMesh::edata.
Referenced by bm_edge_collapse().
|
static |
Definition at line 27 of file bmesh_interp.c.
References CustomData_bmesh_copy_data(), CustomData_bmesh_free_block_data(), CustomData_bmesh_interp(), BMHeader::data, BMElem::head, NULL, src, and w().
Referenced by BM_data_interp_from_edges(), and BM_data_interp_from_verts().
void BM_data_interp_from_verts | ( | BMesh * | bm, |
const BMVert * | v_src_1, | ||
const BMVert * | v_src_2, | ||
BMVert * | v_dst, | ||
float | fac | ||
) |
Data, Interpolate From Verts.
Interpolates per-vertex data from two sources to v_dst
Definition at line 68 of file bmesh_interp.c.
References bm, bm_data_interp_from_elem(), and BMesh::vdata.
Referenced by bm_bridge_splice_loops(), bm_edge_collapse(), BM_edge_split(), BM_vert_collapse_faces(), and bpy_bmvert_copy_from_vert_interp().
void BM_data_layer_add | ( | BMesh * | bm, |
CustomData * | data, | ||
int | type | ||
) |
Definition at line 839 of file bmesh_interp.c.
References bm, CD_DEFAULT, CustomData_add_layer(), data, CustomData::layers, MEM_dupallocN, MEM_freeN, NULL, type, and update_data_blocks().
Referenced by BKE_mesh_ensure_facemap_customdata(), BKE_mesh_ensure_skin_customdata(), BM_custom_loop_normals_to_vector_layer(), BM_lnorspacearr_store(), BM_loop_normal_editdata_array_init(), BM_mesh_cd_flag_apply(), BM_mesh_wireframe(), bmo_bisect_edges_exec(), bmo_subdivide_edges_exec(), BPy_BMEdge_CreatePyObject(), BPy_BMesh_CreatePyObject(), BPy_BMFace_CreatePyObject(), bpy_bmlayercollection_new(), bpy_bmlayercollection_verify(), BPy_BMLoop_CreatePyObject(), BPy_BMVert_CreatePyObject(), build_skin(), edgetag_ensure_cd_flag(), face_map_assign_exec(), fmap_select(), mesh_customdata_custom_splitnormals_add_exec(), SCULPT_dynamic_topology_enable_ex(), sculpt_undo_bmesh_enable(), skin_smooth_hulls(), TEST(), and vgroup_assign_verts().
void BM_data_layer_add_named | ( | BMesh * | bm, |
CustomData * | data, | ||
int | type, | ||
const char * | name | ||
) |
Definition at line 857 of file bmesh_interp.c.
References bm, CD_DEFAULT, CustomData_add_layer_named(), data, CustomData::layers, MEM_dupallocN, MEM_freeN, NULL, type, and update_data_blocks().
Referenced by bevel_set_weighted_normal_face_strength(), BKE_id_attribute_new(), bpy_bmlayercollection_new(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), ED_mesh_color_add(), ED_mesh_sculpt_color_add(), ED_mesh_uv_add(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), and SCULPT_dyntopo_node_layers_add().
void BM_data_layer_copy | ( | BMesh * | bm, |
CustomData * | data, | ||
int | type, | ||
int | src_n, | ||
int | dst_n | ||
) |
Definition at line 944 of file bmesh_interp.c.
References BLI_assert, bm, BM_EDGES_OF_MESH, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_VERTS_OF_MESH, CustomData_bmesh_get_n(), CustomData_bmesh_set_n(), BMHeader::data, data, BMesh::edata, BMVert::head, BMEdge::head, BMLoop::head, BMFace::head, l, BMesh::ldata, BMesh::pdata, ptr, type, and BMesh::vdata.
Referenced by bpy_bmlayeritem_copy_from(), ED_mesh_color_add(), ED_mesh_sculpt_color_add(), and ED_mesh_uv_add().
void BM_data_layer_free | ( | BMesh * | bm, |
CustomData * | data, | ||
int | type | ||
) |
Definition at line 875 of file bmesh_interp.c.
References BLI_assert, bm, CustomData_free_layer_active(), data, CustomData::layers, MEM_dupallocN, MEM_freeN, NULL, type, UNUSED_VARS_NDEBUG, and update_data_blocks().
Referenced by BKE_mesh_clear_facemap_customdata(), BM_mesh_cd_flag_apply(), bpy_bmesh_dealloc(), mesh_customdata_clear_exec__internal(), modifier_skin_customdata_delete(), and multires_customdata_delete().
void BM_data_layer_free_n | ( | BMesh * | bm, |
CustomData * | data, | ||
int | type, | ||
int | n | ||
) |
Definition at line 922 of file bmesh_interp.c.
References BLI_assert, bm, CustomData_free_layer(), CustomData_get_layer_index_n(), data, CustomData::layers, MEM_dupallocN, MEM_freeN, NULL, type, UNUSED_VARS_NDEBUG, and update_data_blocks().
Referenced by bmo_bisect_edges_exec(), bmo_subdivide_edges_exec(), bpy_bmlayercollection_remove(), delete_customdata_layer(), and skin_smooth_hulls().
bool BM_data_layer_free_named | ( | BMesh * | bm, |
CustomData * | data, | ||
const char * | name | ||
) |
Remove a named custom data layer, if it existed. Return true if the layer was removed.
Definition at line 897 of file bmesh_interp.c.
References bm, CustomData_free_layer_named(), data, CustomData::layers, MEM_dupallocN, MEM_freeN, NULL, CustomData::pool, and update_data_blocks().
Referenced by BKE_id_attribute_remove().
|
static |
Data Vert Average.
Sets all the customdata (e.g. vert, loop) associated with a vert to the average of the face regions surrounding it.
Definition at line 88 of file bmesh_interp.c.
float BM_elem_float_data_get | ( | CustomData * | cd, |
void * | element, | ||
int | type | ||
) |
Definition at line 990 of file bmesh_interp.c.
References CustomData_bmesh_get(), data, element, and type.
Referenced by bevel_vert_construct(), edgetag_test_cb(), modifyMesh(), offset_meet_lines_percent_or_absolute(), offset_on_edge_between(), sculpt_face_sets_init_bevel_weight_test(), sculpt_face_sets_init_crease_test(), and TEST().
void BM_elem_float_data_set | ( | CustomData * | cd, |
void * | element, | ||
int | type, | ||
const float | val | ||
) |
Definition at line 996 of file bmesh_interp.c.
References CustomData_bmesh_get(), data, element, and type.
Referenced by edgetag_set_cb(), and TEST().
void BM_face_interp_from_face | ( | BMesh * | bm, |
BMFace * | f_dst, | ||
const BMFace * | f_src, | ||
const bool | do_vertex | ||
) |
Definition at line 169 of file bmesh_interp.c.
References axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_FACE_FIRST_LOOP, BM_face_interp_from_face_ex(), BM_face_is_normal_valid(), BMVert::co, BMHeader::data, float(), BMVert::head, BMLoop::head, BMFace::len, mul_v2_m3v3(), BMLoop::next, BMFace::no, NULL, and BMLoop::v.
Referenced by bpy_bmface_copy_from_face_interp().
void BM_face_interp_from_face_ex | ( | BMesh * | bm, |
BMFace * | f_dst, | ||
const BMFace * | f_src, | ||
bool | do_vertex, | ||
const void ** | blocks, | ||
const void ** | blocks_v, | ||
float(*) | cos_2d[2], | ||
float | axis_mat[3][3] | ||
) |
Data Interpolate From Face.
Projects target onto source, and pulls interpolated custom-data from source.
Definition at line 136 of file bmesh_interp.c.
References BLI_array_alloca, bm, BM_elem_attrs_copy(), BM_FACE_FIRST_LOOP, BMVert::co, CustomData_bmesh_interp(), BMHeader::data, BMVert::head, BMLoop::head, interp_weights_poly_v2(), BMesh::ldata, BMFace::len, mul_v2_m3v3(), BMLoop::next, NULL, BMLoop::v, BMesh::vdata, and w().
Referenced by BM_face_interp_from_face(), bmo_face_inset_individual(), and bmo_inset_region_exec().
Definition at line 559 of file bmesh_interp.c.
References bm, BM_face_calc_center_median(), BM_face_interp_multires_ex(), CD_MDISPS, CustomData_get_offset(), and BMesh::ldata.
void BM_face_interp_multires_ex | ( | BMesh * | bm, |
BMFace * | f_dst, | ||
const BMFace * | f_src, | ||
const float | f_dst_center[3], | ||
const float | f_src_center[3], | ||
const int | cd_loop_mdisp_offset | ||
) |
Definition at line 544 of file bmesh_interp.c.
References bm, BM_FACE_FIRST_LOOP, BM_loop_interp_multires_ex(), and BMLoop::next.
Referenced by BM_edge_split(), BM_face_interp_multires(), BM_face_split(), BM_face_triangulate(), bmo_poke_exec(), and tc_mesh_customdatacorrect_apply_vert().
Smooths boundaries between multi-res grids, including some borders in adjacent faces.
mdisps is a grid of displacements, ordered thus:
v4/next | | v1/cent-----mid2 ---> x | | | | | | v2/prev---mid1-----v3/cur | V y
mdisps is a grid of displacements, ordered thus:
v4/next | | v1/cent-----mid2 ---> x | | | | | | v2/prev---mid1-----v3/cur | V y
Definition at line 574 of file bmesh_interp.c.
References add_v3_v3v3(), bm, BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_FACE, CD_MDISPS, copy_v3_v3(), CustomData_get_offset(), MDisps::disps, l, BMesh::ldata, mid_v3_v3v3(), mul_v3_fl(), BMLoop::next, BMLoop::prev, BMLoop::radial_next, sqrt(), MDisps::totdisp, BMLoop::v, and y.
Referenced by BM_edge_split(), and BM_face_split().
|
static |
Definition at line 373 of file bmesh_interp.c.
References add_v3_v3v3(), usdtokens::b(), bm_loop_flip_equotion(), cross_v3_v3v3(), fabsf, mul_v3_v3fl(), project_v3_v3v3(), and sub_v3_v3v3().
Referenced by loop_interp_multires_cb().
|
static |
Definition at line 355 of file bmesh_interp.c.
References usdtokens::b(), and cross_v2v2().
Referenced by bm_loop_flip_disp().
void BM_loop_interp_from_face | ( | BMesh * | bm, |
BMLoop * | l_dst, | ||
const BMFace * | f_src, | ||
bool | do_vertex, | ||
bool | do_multires | ||
) |
Projects a single loop, target, onto f_src for custom-data interpolation. multi-resolution is handled.
do_vertex | When true the target's vert data will also get interpolated. |
Definition at line 682 of file bmesh_interp.c.
References axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_face_calc_tangent_auto(), BM_FACE_FIRST_LOOP, BM_face_is_normal_valid(), BM_loop_interp_multires(), BMVert::co, copy_v3_v3(), CustomData_bmesh_interp(), BMHeader::data, float(), BMVert::head, BMLoop::head, interp_weights_poly_v2(), is_zero_v3(), BMesh::ldata, BMFace::len, mul_v2_m3v3(), BMLoop::next, BMFace::no, normalize_v3(), NULL, ortho_v3_v3(), BMLoop::v, BMesh::vdata, and w().
Referenced by bev_create_ngon(), BM_face_split_n(), bmo_poke_exec(), bpy_bmloop_copy_from_face_interp(), tc_mesh_customdatacorrect_apply_vert(), and tc_mesh_customdatacorrect_face_substitute_set().
Project the multi-resolution grid in target onto f_src's set of multi-resolution grids.
Definition at line 529 of file bmesh_interp.c.
References bm, BM_face_calc_center_median(), BM_loop_interp_multires_ex(), CD_MDISPS, CustomData_get_offset(), BMLoop::f, and BMesh::ldata.
Referenced by BM_loop_interp_from_face().
void BM_loop_interp_multires_ex | ( | BMesh * | UNUSEDbm, |
BMLoop * | l_dst, | ||
const BMFace * | f_src, | ||
const float | f_dst_center[3], | ||
const float | f_src_center[3], | ||
const int | cd_loop_mdisp_offset | ||
) |
Definition at line 472 of file bmesh_interp.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, compute_mdisp_quad(), data, MDisps::disps, BMLoop::f, float(), BMFace::len, MDisps::level, loop_interp_multires_cb(), mdisp_axis_from_quad(), MEM_callocN, sqrt(), MDisps::totdisp, UNLIKELY, TaskParallelSettings::use_threading, v1, and v2.
Referenced by BM_face_interp_multires_ex(), BM_faces_join(), and BM_loop_interp_multires().
|
static |
Definition at line 1058 of file bmesh_interp.c.
References BM_ELEM_CD_GET_VOID_P, BM_elem_flag_disable, BM_elem_index_get, BM_ELEM_INTERNAL_TAG, LoopWalkCtx::cd_layer_offset, LoopWalkCtx::data_array, LoopWalkCtx::data_index_array, LoopWalkCtx::data_len, l, LoopWalkCtx::loop_weights, w(), LoopWalkCtx::weight_accum, and LoopWalkCtx::weight_array.
Referenced by bm_loop_walk_data().
|
static |
called recursively, keep stack-usage minimal.
Definition at line 1076 of file bmesh_interp.c.
References BLI_assert, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_INTERNAL_TAG, bm_loop_walk_add(), LoopWalkCtx::cd_layer_offset, CustomData_data_equals(), LoopWalkCtx::data_ref, BMLoop::next, BMLoop::prev, BMLoop::radial_next, LoopWalkCtx::type, and BMLoop::v.
Referenced by BM_vert_loop_groups_data_layer_create().
Definition at line 736 of file bmesh_interp.c.
References axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_FACE_FIRST_LOOP, BM_face_is_normal_valid(), BMVert::co, CustomData_bmesh_interp(), BMHeader::data, float(), BMVert::head, interp_weights_poly_v2(), BMFace::len, mul_v2_m3v3(), BMLoop::next, BMFace::no, NULL, BMLoop::v, BMesh::vdata, and w().
Referenced by bpy_bmvert_copy_from_face_interp().
LinkNode* BM_vert_loop_groups_data_layer_create | ( | BMesh * | bm, |
BMVert * | v, | ||
const int | layer_n, | ||
const float * | loop_weights, | ||
MemArena * | arena | ||
) |
Definition at line 1104 of file bmesh_interp.c.
References LoopWalkCtx::arena, BLI_assert, BLI_linklist_prepend_arena(), BLI_memarena_alloc(), bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_index_set, BM_ELEM_INTERNAL_TAG, BM_ITER_ELEM, BM_LOOP, bm_loop_walk_data(), BM_LOOPS_OF_VERT, LoopWalkCtx::cd_layer_offset, copy_vn_fl(), LoopGroupCD::data, LoopWalkCtx::data_array, LoopGroupCD::data_index, LoopWalkCtx::data_index_array, LoopWalkCtx::data_len, LoopGroupCD::data_len, LoopWalkCtx::data_ref, LoopGroupCD::data_weights, BMesh::elem_index_dirty, l, CustomData::layers, BMesh::ldata, LIKELY, LoopWalkCtx::loop_weights, mul_vn_fl(), NULL, CustomDataLayer::offset, LoopWalkCtx::type, CustomDataLayer::type, v, LoopWalkCtx::weight_accum, and LoopWalkCtx::weight_array.
Referenced by tc_mesh_customdatacorrect_init_vert().
Take existing custom data and merge each fan's data.
Definition at line 1219 of file bmesh_interp.c.
References bm, bm_vert_loop_groups_data_layer_merge__single(), CustomData_sizeof(), CustomData::layers, BMesh::ldata, LinkNode::link, LinkNode::next, size(), type, and CustomDataLayer::type.
Referenced by tc_mesh_customdatacorrect_apply_vert().
|
static |
Definition at line 1165 of file bmesh_interp.c.
References bm, CustomData_bmesh_interp_n(), CustomData_copy_elements(), LoopGroupCD::data, LoopGroupCD::data_len, LoopGroupCD::data_weights, CustomData::layers, BMesh::ldata, NULL, type, and CustomDataLayer::type.
Referenced by BM_vert_loop_groups_data_layer_merge().
void BM_vert_loop_groups_data_layer_merge_weights | ( | BMesh * | bm, |
struct LinkNode * | groups, | ||
int | layer_n, | ||
const float * | loop_weights | ||
) |
A version of BM_vert_loop_groups_data_layer_merge that takes an array of loop-weights (aligned with BM_LOOPS_OF_VERT iterator).
Definition at line 1230 of file bmesh_interp.c.
References bm, bm_vert_loop_groups_data_layer_merge_weights__single(), CustomData_sizeof(), CustomData::layers, BMesh::ldata, LinkNode::link, LinkNode::next, size(), type, and CustomDataLayer::type.
Referenced by tc_mesh_customdatacorrect_apply_vert().
|
static |
Definition at line 1185 of file bmesh_interp.c.
References BLI_array_alloca, bm, CustomData_bmesh_interp_n(), CustomData_copy_elements(), LoopGroupCD::data, LoopGroupCD::data_index, LoopGroupCD::data_len, LoopGroupCD::data_weights, CustomData::layers, BMesh::ldata, LIKELY, mul_vn_fl(), NULL, type, CustomDataLayer::type, and w().
Referenced by BM_vert_loop_groups_data_layer_merge_weights().
|
static |
Multires Interpolation.
mdisps is a grid of displacements, ordered thus:
v1/center----v4/next -> x | | | | v2/prev------v3/cur | V y
Definition at line 211 of file bmesh_interp.c.
References BLI_assert, BM_face_calc_center_median(), BMVert::co, copy_v3_v3(), equals_v3v3(), BMLoop::f, l, mid_v3_v3v3(), BMLoop::next, BMLoop::prev, sub_v3_v3v3(), BMLoop::v, v1, and v2.
Referenced by BM_loop_interp_multires_ex(), and mdisp_in_mdispquad().
|
static |
Definition at line 421 of file bmesh_interp.c.
References BM_ELEM_CD_GET_VOID_P, bm_loop_flip_disp(), data, MDisps::disps, interp_v3_v3v3(), madd_v3_v3v3fl(), mdisp_in_mdispquad(), BMLoop::next, old_mdisps_bilinear(), v1, x, and y.
Referenced by BM_loop_interp_multires_ex().
|
static |
Definition at line 287 of file bmesh_interp.c.
References normalize_v3(), sub_v3_v3v3(), v1, and v2.
Referenced by BM_loop_interp_multires_ex(), and mdisp_in_mdispquad().
|
static |
l_src | is loop whose internal displacement. |
l_dst | is loop to project onto. |
p | The point being projected. |
r_axis_x,r_axis_y | The location in loop's CD_MDISPS grid of point p . |
Definition at line 307 of file bmesh_interp.c.
References add_v3_v3(), BM_vert_normal_update_all(), Freestyle::c, compute_mdisp_quad(), eps, is_zero_v3(), mdisp_axis_from_quad(), mid_v3_v3v3v3v3(), mul_v2_fl(), mul_v3_fl(), BMVert::no, quad_co(), sub_v3_v3(), BMLoop::v, v1, and v2.
Referenced by loop_interp_multires_cb().
|
static |
Definition at line 245 of file bmesh_interp.c.
References copy_v3_v3(), dot_v3v3(), isect_point_quad_v2(), normal_quad_v3(), poly_rotate_plane(), resolve_quad_uv_v2(), sub_v2_v2(), v1, and v2.
Referenced by mdisp_in_mdispquad().
|
static |
Definition at line 765 of file bmesh_interp.c.
References BLI_assert, BLI_mempool_destroy(), bm, BM_EDGE, BM_EDGES_OF_MESH, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOP, BM_LOOPS_OF_FACE, BM_VERT, BM_VERTS_OF_MESH, CustomData_bmesh_copy_data(), CustomData_bmesh_free_block(), CustomData_bmesh_init_pool(), CustomData_bmesh_set_default(), BMHeader::data, data, BMesh::edata, BMVert::head, BMEdge::head, BMLoop::head, BMFace::head, l, BMesh::ldata, NULL, BMesh::pdata, CustomData::pool, BMesh::totedge, BMesh::totface, BMesh::totloop, BMesh::totvert, and BMesh::vdata.
Referenced by BM_data_layer_add(), BM_data_layer_add_named(), BM_data_layer_free(), BM_data_layer_free_n(), and BM_data_layer_free_named().