Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_alloca.h"
#include "BLI_edgehash.h"
#include "BLI_math.h"
#include "BLI_memarena.h"
#include "BLI_string.h"
#include "BLT_translation.h"
#include "BKE_bvhutils.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "ED_armature.h"
#include "ED_mesh.h"
#include "DEG_depsgraph.h"
#include "eigen_capi.h"
#include "meshlaplacian.h"
Go to the source code of this file.
Classes | |
struct | LaplacianSystem |
struct | LaplacianSystem::HeatWeighting |
struct | BVHCallbackUserData |
struct | MDefBoundIsect |
struct | MDefBindInfluence |
struct | MeshDeformBind |
struct | MeshDeformIsect |
struct | MeshRayCallbackData |
Macros | |
#define | C_WEIGHT 1.0f |
#define | WEIGHT_LIMIT_START 0.05f |
#define | WEIGHT_LIMIT_END 0.025f |
#define | DISTANCE_EPSILON 1e-4f |
#define | EPSILON 0.0001f |
#define | MESHDEFORM_TAG_UNTYPED 0 |
#define | MESHDEFORM_TAG_BOUNDARY 1 |
#define | MESHDEFORM_TAG_INTERIOR 2 |
#define | MESHDEFORM_TAG_EXTERIOR 3 |
#define | MESHDEFORM_LEN_THRESHOLD 1e-6f |
#define | MESHDEFORM_MIN_INFLUENCE 0.0005f |
Typedefs | |
typedef struct BVHCallbackUserData | BVHCallbackUserData |
typedef struct MDefBoundIsect | MDefBoundIsect |
typedef struct MDefBindInfluence | MDefBindInfluence |
typedef struct MeshDeformBind | MeshDeformBind |
typedef struct MeshDeformIsect | MeshDeformIsect |
Variables | |
static const int | MESHDEFORM_OFFSET [7][3] |
Algorithms using the mesh laplacian.
Definition in file meshlaplacian.c.
#define C_WEIGHT 1.0f |
Definition at line 366 of file meshlaplacian.c.
Definition at line 369 of file meshlaplacian.c.
#define EPSILON 0.0001f |
Definition at line 839 of file meshlaplacian.c.
minimum length for MDefBoundIsect.len
Definition at line 847 of file meshlaplacian.c.
#define MESHDEFORM_MIN_INFLUENCE 0.0005f |
Definition at line 849 of file meshlaplacian.c.
#define MESHDEFORM_TAG_BOUNDARY 1 |
Definition at line 842 of file meshlaplacian.c.
#define MESHDEFORM_TAG_EXTERIOR 3 |
Definition at line 844 of file meshlaplacian.c.
#define MESHDEFORM_TAG_INTERIOR 2 |
Definition at line 843 of file meshlaplacian.c.
#define MESHDEFORM_TAG_UNTYPED 0 |
Definition at line 841 of file meshlaplacian.c.
#define WEIGHT_LIMIT_END 0.025f |
Definition at line 368 of file meshlaplacian.c.
#define WEIGHT_LIMIT_START 0.05f |
Definition at line 367 of file meshlaplacian.c.
typedef struct BVHCallbackUserData BVHCallbackUserData |
typedef struct MDefBindInfluence MDefBindInfluence |
typedef struct MDefBoundIsect MDefBoundIsect |
typedef struct MeshDeformBind MeshDeformBind |
typedef struct MeshDeformIsect MeshDeformIsect |
|
static |
Definition at line 377 of file meshlaplacian.c.
References data, BVHTreeRayHit::dist, dot_v3v3(), float(), BVHTreeRayHit::index, BVHTreeRay::isect_precalc, isect_ray_tri_v3(), isect_ray_tri_watertight_v3(), normal_tri_v3(), NULL, MLoopTri::tri, UNPACK3, UNUSED_VARS, MLoop::v, and verts.
Referenced by heat_ray_source_visible().
void ED_mesh_deform_bind_callback | ( | Object * | object, |
MeshDeformModifierData * | mmd, | ||
Mesh * | cagemesh, | ||
float * | vertexcos, | ||
int | verts_num, | ||
float | cagemat[4][4] | ||
) |
Definition at line 1736 of file meshlaplacian.c.
References Freestyle::a, MeshDeformModifierData::bindcagecos, MeshDeformModifierData::bindmat, BKE_mesh_wrapper_ensure_mdata(), BKE_modifier_get_original(), BKE_modifier_mdef_compact_influences(), MeshDeformBind::cage_verts_num, MeshDeformModifierData::cage_verts_num, MeshDeformBind::cagecos, MeshDeformBind::cagemat, MeshDeformBind::cagemesh, MVert::co, copy_m4_m4(), copy_v3_v3(), end_progress_bar(), harmonic_coordinates_bind(), MeshRayCallbackData::mdb, MEM_callocN, MEM_freeN, MeshDeformModifierData::modifier, mul_m4_v3(), mul_v3_m4v3(), Mesh::mvert, MeshDeformModifierData::object, Object::obmat, start_progress_bar(), Mesh::totvert, MeshDeformBind::vertexcos, MeshDeformBind::verts_num, MeshDeformModifierData::verts_num, and waitcursor().
Referenced by meshdeform_bind_exec().
Definition at line 48 of file meshlaplacian.c.
Referenced by ED_mesh_deform_bind_callback().
|
static |
Definition at line 51 of file meshlaplacian.c.
References str.
Referenced by add_verts_to_dgroups(), ANIM_apply_keyingset(), AVI_print_error(), Freestyle::BezierCurve::BezierCurve(), Freestyle::StrokeShaders::BezierCurveShader::BezierCurveShader(), Freestyle::Operators::bidirectionalChain(), BKE_ptcache_write(), BKE_tracking_reconstruction_solve(), BLI_bitmap_draw_2d_line_v2v2i(), BLI_file_alias_target(), BLI_file_attributes(), blo_do_versions_280(), bm_edges_sort_winding(), BM_faces_join(), bmo_join_triangles_exec(), BMO_op_vinitf(), bpy_batch_remove(), bpy_user_map(), Freestyle::Operators::chain(), BlenderSession::check_and_report_session_error(), blender::gpu::shader::ShaderCreateInfo::check_error(), blender::gpu::debug::check_gl_error(), clean_tracks_exec(), blender::compositor::OpenCLDevice::COM_cl_attach_memory_buffer_offset_to_kernel_parameter(), blender::compositor::OpenCLDevice::COM_cl_attach_memory_buffer_to_kernel_parameter(), blender::compositor::OpenCLDevice::COM_cl_attach_output_memory_buffer_to_kernel_parameter(), blender::compositor::OpenCLDevice::COM_cl_attach_size_to_kernel_parameter(), blender::compositor::OpenCLDevice::COM_cl_create_kernel(), blender::compositor::OpenCLDevice::COM_cl_enqueue_range(), copypose_error(), correctivesmooth_modifier_do(), Freestyle::Operators::create(), GHOST_XrContext::dispatchErrorMessage(), dynamicPaint_createUVSurface(), egl_chk(), libmv::euclidean_resection::EuclideanResectionPPnP(), blender::compositor::WriteBufferOperation::execute_opencl_region(), expr_pylike_error_test(), filtcolum(), filtrow(), blender::gpu::shader::ShaderCreateInfo::finalize(), Freestyle::FitCurveWrapper::FitCubic(), Freestyle::FitCurveWrapper::FitCurve(), get_cursor_settings(), get_egl_error_enum_string(), get_egl_error_message_string(), get_glew_error_enum_string(), get_limit_motor_info2(), GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(), glew_chk(), GPU_offscreen_create(), GPU_shader_create_from_info(), GPU_shader_create_info_check_error(), ErrorHandler::handleError(), handleNumInput(), GHOST_ContextEGL::initializeDrawingContext(), GHOST_ContextWGL::initializeDrawingContext(), kernel_adaptive_sampling_convergence_check(), DenoiseImage::load(), DenoiseImage::load_previous(), make_renderinfo_string(), MemorY_ErroR(), merge_pixels(), meshdeform_matrix_solve(), libmv::Dogleg< Function, Jacobian, Solver >::minimize(), libmv::LevenbergMarquardt< Function, Jacobian, Solver >::minimize(), modifyMesh(), open_images(), blender::compositor::opencl_initialize(), blender::compositor::OpenCLDevice::OpenCLDevice(), DenoiseImage::parse_channels(), parse_channels(), blender::gpu::Shader::print_log(), ptcache_basic_header_read(), ptcache_disk_frame_to_mem(), ptcache_file_header_begin_read(), ptcache_mem_frame_to_disk(), ptcache_read_stream(), ptcache_write(), ptcache_write_stream(), pygpu_shader_create_from_info(), pyop_poll_message_get_fn(), pyrna_enum_bitmap_from_set(), pyrna_func_error_prefix(), quad_calc_error(), reconstruct_retrieve_libmv_tracks(), rna_def_function(), RNA_def_property(), RNA_def_property_srna(), RNA_def_struct_ptr(), rna_validate_identifier(), save_output(), DenoiseImage::save_output(), Freestyle::Operators::sequentialSplit(), Device::set_error(), solve_camera_freejob(), blender::gpu::MTLCommandBufferManager::submit(), surfaceGenerateGrid(), mv::TEST(), btDeformableLagrangianForce::testDerivative(), btDeformableLagrangianForce::testHessian(), ui_number_from_string_units(), UI_ThemeGetColorPtr(), libmv::Dogleg< Function, Jacobian, Solver >::Update(), libmv::LevenbergMarquardt< Function, Jacobian, Solver >::Update(), iTaSC::Distance::updateControlOutput(), and wm_xr_error_handler().
|
static |
Definition at line 1569 of file meshlaplacian.c.
References Freestyle::a, usdtokens::b(), MeshDeformModifierData::bindweights, BKE_bvhtree_from_mesh_get(), BKE_mesh_poly_normals_ensure(), BKE_mesh_runtime_looptri_ensure(), BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_memarena_use_calloc(), MeshDeformBind::boundisect, MeshDeformBind::bvhdata, MeshDeformBind::bvhtree, BVHTREE_FROM_LOOPTRI, MeshDeformBind::cage_verts_num, MeshDeformBind::cagecos, MeshDeformBind::cagemesh, MeshDeformBind::cagemesh_cache, center, copy_v3_v3(), MeshDeformModifierData::dyncellmin, MeshDeformModifierData::dyncellwidth, MeshDeformBind::dyngrid, MeshDeformModifierData::dyngrid, MeshDeformModifierData::dyngridsize, MeshDeformModifierData::dyninfluences, MeshDeformModifierData::dynverts, MeshDeformModifierData::flag, free_bvhtree_from_mesh(), MeshDeformModifierData::gridsize, MeshDeformBind::halfwidth, MDefCell::influences_num, MeshDeformModifierData::influences_num, INIT_MINMAX, MeshDeformBind::inside, MeshDeformBind::looptri, MeshDeformBind::max, MeshRayCallbackData::mdb, MEM_callocN, MEM_freeN, MeshDeformBind::memarena, meshdeform_add_intersections(), meshdeform_bind_floodfill(), meshdeform_check_semibound(), meshdeform_inside_cage(), meshdeform_matrix_solve(), MESHDEFORM_TAG_UNTYPED, MeshDeformBind::min, minmax_v3v3_v3(), MeshDeformBind::mloop, Mesh::mloop, MOD_MDEF_DYNAMIC_BIND, MeshDeformBind::mpoly, Mesh::mpoly, MDefBindInfluence::next, offset, MDefCell::offset, MeshDeformBind::phi, MeshDeformBind::poly_nors, progress_bar(), MeshDeformBind::semibound, MeshDeformBind::size, MeshDeformBind::size3, MeshDeformBind::tag, MeshDeformBind::totalphi, MDefBindInfluence::vertex, MDefInfluence::vertex, MeshDeformBind::vertexcos, MeshDeformBind::verts_num, MDefBindInfluence::weight, MDefInfluence::weight, MeshDeformBind::weights, MeshDeformBind::width, x, y, and z.
Referenced by ED_mesh_deform_bind_callback().
|
static |
Definition at line 938 of file meshlaplacian.c.
References MeshDeformBind::cagecos, MeshDeformBind::cagemesh_cache, BVHTreeRayHit::co, copy_v3_v3(), data, BVHTreeRay::direction, BVHTreeRayHit::dist, dot_v3v3(), float(), BVHTreeRayHit::index, MeshRayCallbackData::isec, MeshDeformIsect::isect, BVHTreeRay::isect_precalc, isect_ray_tri_watertight_v3(), MeshDeformIsect::lambda, MeshDeformBind::looptri, madd_v3_v3v3fl(), MeshRayCallbackData::mdb, MeshDeformBind::mloop, normal_tri_v3(), NULL, BVHTreeRay::origin, MeshDeformBind::poly_nors, UNPACK3, MLoop::v, and MeshDeformIsect::vec_length.
Referenced by meshdeform_ray_tree_intersect().
void heat_bone_weighting | ( | Object * | ob, |
Mesh * | me, | ||
float(*) | verts[3], | ||
int | numbones, | ||
bDeformGroup ** | dgrouplist, | ||
bDeformGroup ** | dgroupflip, | ||
float(*) | root[3], | ||
float(*) | tip[3], | ||
const int * | selected, | ||
const char ** | error_str | ||
) |
Definition at line 635 of file meshlaplacian.c.
References Freestyle::a, BKE_mesh_recalc_looptri(), ED_vgroup_vert_add(), ED_vgroup_vert_remove(), ED_vgroup_vert_weight(), Mesh::editflag, MVert::flag, MPoly::flag, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_laplacian_create(), heat_limit_weight(), heat_ray_tree_create(), heat_source_closest(), heat_system_free(), laplacian_add_right_hand_side(), laplacian_begin_solve(), laplacian_system_construct_begin(), laplacian_system_construct_end(), laplacian_system_delete(), laplacian_system_get_solution(), laplacian_system_solve(), MPoly::loopstart, mask(), ME_EDIT_MIRROR_TOPO, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, ME_FACE_SEL, MEM_callocN, MEM_freeN, MEM_mallocN, mesh_get_x_mirror_vert(), LaplacianSystem::HeatWeighting::mloop, Mesh::mloop, LaplacianSystem::HeatWeighting::mlooptri, Object::mode, Mesh::mpoly, Mesh::mvert, N_, NULL, LaplacianSystem::HeatWeighting::numsource, OB_MODE_WEIGHT_PAINT, LaplacianSystem::HeatWeighting::p, poly_to_tri_count(), LaplacianSystem::HeatWeighting::root, SELECT, BVHCallbackUserData::sys, LaplacianSystem::HeatWeighting::tip, Mesh::totloop, Mesh::totpoly, Mesh::totvert, LaplacianSystem::HeatWeighting::tris_num, MLoop::v, LaplacianSystem::HeatWeighting::verts, verts, LaplacianSystem::HeatWeighting::verts_num, WEIGHT_ADD, and WEIGHT_REPLACE.
Referenced by add_verts_to_dgroups().
|
static |
Definition at line 551 of file meshlaplacian.c.
References Freestyle::a, add_v3_v3(), LaplacianSystem::faces, LaplacianSystem::heat, MEM_callocN, normal_tri_v3(), normalize_v3(), BVHCallbackUserData::sys, v1, v2, LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::HeatWeighting::vnors.
Referenced by heat_laplacian_create().
|
static |
Definition at line 575 of file meshlaplacian.c.
References Freestyle::a, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_calc_vnormals(), heat_set_H(), laplacian_add_triangle(), laplacian_add_vertex(), MEM_callocN, LaplacianSystem::HeatWeighting::mindist, LaplacianSystem::HeatWeighting::mloop, LaplacianSystem::HeatWeighting::mlooptri, LaplacianSystem::HeatWeighting::p, BVHCallbackUserData::sys, LaplacianSystem::HeatWeighting::tris_num, UNPACK3, MLoop::v, LaplacianSystem::HeatWeighting::verts, and LaplacianSystem::HeatWeighting::verts_num.
Referenced by heat_bone_weighting().
Definition at line 621 of file meshlaplacian.c.
References t, WEIGHT_LIMIT_END, and WEIGHT_LIMIT_START.
Referenced by heat_bone_weighting().
|
static |
Definition at line 447 of file meshlaplacian.c.
References BLI_bvhtree_ray_cast(), bvh_callback(), LaplacianSystem::HeatWeighting::bvhtree, closest_to_line_segment_v3(), copy_v3_v3(), data, BVHTreeRayHit::dist, e, LaplacianSystem::heat, BVHTreeRayHit::index, madd_v3_v3v3fl(), mul_v3_fl(), normalize_v3(), NULL, LaplacianSystem::HeatWeighting::root, sub_v3_v3v3(), BVHCallbackUserData::sys, LaplacianSystem::HeatWeighting::tip, LaplacianSystem::HeatWeighting::verts, and LaplacianSystem::HeatWeighting::vltree.
Referenced by heat_source_closest().
|
static |
Definition at line 410 of file meshlaplacian.c.
References Freestyle::a, BLI_bvhtree_balance(), BLI_bvhtree_insert(), BLI_bvhtree_new(), LaplacianSystem::HeatWeighting::bvhtree, float(), LaplacianSystem::heat, INIT_MINMAX, MEM_callocN, minmax_v3v3_v3(), LaplacianSystem::HeatWeighting::mloop, LaplacianSystem::HeatWeighting::mlooptri, BVHCallbackUserData::sys, MLoopTri::tri, LaplacianSystem::HeatWeighting::tris_num, MLoop::v, LaplacianSystem::HeatWeighting::verts, verts, LaplacianSystem::HeatWeighting::verts_num, and LaplacianSystem::HeatWeighting::vltree.
Referenced by heat_bone_weighting().
|
static |
Definition at line 512 of file meshlaplacian.c.
References C_WEIGHT, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_source_closest(), heat_source_distance(), max_ff(), LaplacianSystem::HeatWeighting::mindist, LaplacianSystem::HeatWeighting::numsource, LaplacianSystem::HeatWeighting::p, and BVHCallbackUserData::sys.
Referenced by heat_laplacian_create().
|
static |
Definition at line 497 of file meshlaplacian.c.
References DISTANCE_EPSILON, heat_ray_source_visible(), heat_source_distance(), and BVHCallbackUserData::sys.
Referenced by heat_bone_weighting(), and heat_set_H().
|
static |
Definition at line 480 of file meshlaplacian.c.
References closest(), closest_to_line_segment_v3(), dot_v3v3(), LaplacianSystem::heat, normalize_v3(), LaplacianSystem::HeatWeighting::root, sub_v3_v3v3(), BVHCallbackUserData::sys, LaplacianSystem::HeatWeighting::tip, LaplacianSystem::HeatWeighting::verts, and LaplacianSystem::HeatWeighting::vnors.
Referenced by heat_set_H(), and heat_source_closest().
|
static |
Definition at line 609 of file meshlaplacian.c.
References BLI_bvhtree_free(), LaplacianSystem::HeatWeighting::bvhtree, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, MEM_freeN, LaplacianSystem::HeatWeighting::mindist, LaplacianSystem::HeatWeighting::mlooptri, LaplacianSystem::HeatWeighting::p, BVHCallbackUserData::sys, LaplacianSystem::HeatWeighting::vltree, and LaplacianSystem::HeatWeighting::vnors.
Referenced by heat_bone_weighting().
void laplacian_add_right_hand_side | ( | LaplacianSystem * | sys, |
int | v, | ||
float | value | ||
) |
Definition at line 343 of file meshlaplacian.c.
References LaplacianSystem::context, EIG_linear_solver_right_hand_side_add(), and v.
Referenced by heat_bone_weighting().
void laplacian_add_triangle | ( | LaplacianSystem * | sys, |
int | v1, | ||
int | v2, | ||
int | v3 | ||
) |
Definition at line 239 of file meshlaplacian.c.
References LaplacianSystem::faces, LaplacianSystem::faces_num, v1, and v2.
Referenced by heat_laplacian_create().
void laplacian_add_vertex | ( | LaplacianSystem * | sys, |
float * | co, | ||
int | pinned | ||
) |
Definition at line 232 of file meshlaplacian.c.
References LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::vpinned.
Referenced by heat_laplacian_create().
void laplacian_begin_solve | ( | LaplacianSystem * | sys, |
int | index | ||
) |
Definition at line 325 of file meshlaplacian.c.
References Freestyle::a, LaplacianSystem::context, EIG_linear_solver_variable_lock(), EIG_linear_solver_variable_set(), LaplacianSystem::variablesdone, LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::vpinned.
Referenced by heat_bone_weighting(), and laplacian_system_construct_end().
|
static |
Definition at line 119 of file meshlaplacian.c.
References BLI_edgehash_lookup(), v1, and v2.
Referenced by laplacian_triangle_weights().
Definition at line 107 of file meshlaplacian.c.
References BLI_edgehash_ensure_p(), v1, and v2.
Referenced by laplacian_system_construct_end().
|
static |
Definition at line 205 of file meshlaplacian.c.
References LaplacianSystem::areaweights, LaplacianSystem::context, EIG_linear_least_squares_solver_new(), EIG_linear_solver_new(), LaplacianSystem::faces, LaplacianSystem::faces_num, MEM_callocN, LaplacianSystem::storeweights, LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::vpinned.
Referenced by heat_bone_weighting().
|
static |
Definition at line 247 of file meshlaplacian.c.
References Freestyle::a, LaplacianSystem::areaweights, BLI_edgehash_free(), BLI_edgehash_new_ex(), BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS, LaplacianSystem::context, LaplacianSystem::edgehash, EIG_linear_solver_matrix_add(), LaplacianSystem::faces, LaplacianSystem::faces_num, LaplacianSystem::fweights, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, laplacian_begin_solve(), laplacian_increase_edge_count(), laplacian_triangle_area(), laplacian_triangle_weights(), MEM_callocN, MEM_freeN, MEM_SAFE_FREE, NULL, LaplacianSystem::storeweights, LaplacianSystem::varea, and LaplacianSystem::verts_num.
Referenced by heat_bone_weighting().
|
static |
Definition at line 303 of file meshlaplacian.c.
References LaplacianSystem::context, EIG_linear_solver_delete(), LaplacianSystem::faces, LaplacianSystem::fweights, MEM_freeN, LaplacianSystem::varea, LaplacianSystem::verts, and LaplacianSystem::vpinned.
Referenced by heat_bone_weighting().
float laplacian_system_get_solution | ( | LaplacianSystem * | sys, |
int | v | ||
) |
Definition at line 357 of file meshlaplacian.c.
References LaplacianSystem::context, EIG_linear_solver_variable_get(), and v.
Referenced by heat_bone_weighting().
int laplacian_system_solve | ( | LaplacianSystem * | sys | ) |
Definition at line 348 of file meshlaplacian.c.
References LaplacianSystem::context, EIG_linear_solver_solve(), and LaplacianSystem::variablesdone.
Referenced by heat_bone_weighting().
|
static |
Definition at line 124 of file meshlaplacian.c.
References angle_v3v3v3(), blender::compositor::area(), area_tri_v3(), cotangent_tri_weight_v3(), DEG2RADF, i1, len_v3v3(), v1, v2, LaplacianSystem::varea, and LaplacianSystem::verts.
Referenced by laplacian_system_construct_end().
|
static |
Definition at line 170 of file meshlaplacian.c.
References LaplacianSystem::context, cotangent_tri_weight_v3(), LaplacianSystem::edgehash, EIG_linear_solver_matrix_add(), LaplacianSystem::fweights, i1, laplacian_edge_count(), LaplacianSystem::storeweights, v1, v2, LaplacianSystem::varea, and LaplacianSystem::verts.
Referenced by laplacian_system_construct_end().
|
static |
Definition at line 1113 of file meshlaplacian.c.
References Freestyle::a, MeshDeformBind::boundisect, center, MeshRayCallbackData::mdb, meshdeform_cell_center(), meshdeform_index(), meshdeform_ray_tree_intersect(), MESHDEFORM_TAG_BOUNDARY, MeshDeformBind::tag, x, y, and z.
Referenced by harmonic_coordinates_bind().
|
static |
Definition at line 1138 of file meshlaplacian.c.
References Freestyle::a, usdtokens::b(), MeshDeformBind::boundisect, MeshRayCallbackData::mdb, MEM_callocN, MEM_freeN, meshdeform_index(), MESHDEFORM_TAG_BOUNDARY, MESHDEFORM_TAG_EXTERIOR, MESHDEFORM_TAG_INTERIOR, MESHDEFORM_TAG_UNTYPED, MeshDeformBind::semibound, size(), MeshDeformBind::size, MeshDeformBind::size3, and MeshDeformBind::tag.
Referenced by harmonic_coordinates_bind().
|
static |
Definition at line 1205 of file meshlaplacian.c.
References MeshDeformBind::cagemesh_cache, MPoly::loopstart, MeshRayCallbackData::mdb, MeshDeformBind::mloop, MeshDeformBind::mpoly, MDefBoundIsect::poly_index, MDefBoundIsect::poly_weights, MPoly::totloop, and MLoop::v.
Referenced by meshdeform_matrix_add_rhs(), and meshdeform_matrix_add_semibound_phi().
|
static |
Definition at line 1298 of file meshlaplacian.c.
References Freestyle::a, MeshDeformBind::boundisect, MDefBoundIsect::len, MeshRayCallbackData::mdb, meshdeform_index(), MeshDeformBind::semibound, MeshDeformBind::width, x, y, and z.
Referenced by meshdeform_matrix_add_cell(), meshdeform_matrix_add_rhs(), and meshdeform_matrix_add_semibound_phi().
BLI_INLINE void meshdeform_cell_center | ( | MeshDeformBind * | mdb, |
int | x, | ||
int | y, | ||
int | z, | ||
int | n, | ||
float * | center | ||
) |
Definition at line 1101 of file meshlaplacian.c.
References center, MeshDeformBind::halfwidth, MeshRayCallbackData::mdb, MESHDEFORM_OFFSET, MeshDeformBind::min, MeshDeformBind::width, x, y, and z.
Referenced by meshdeform_add_intersections().
|
static |
Definition at line 1282 of file meshlaplacian.c.
References Freestyle::a, MeshDeformBind::boundisect, MeshRayCallbackData::mdb, meshdeform_index(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::semibound, MeshDeformBind::tag, x, y, and z.
Referenced by harmonic_coordinates_bind().
BLI_INLINE int meshdeform_index | ( | MeshDeformBind * | mdb, |
int | x, | ||
int | y, | ||
int | z, | ||
int | n | ||
) |
Definition at line 1080 of file meshlaplacian.c.
References MeshRayCallbackData::mdb, MESHDEFORM_OFFSET, size(), MeshDeformBind::size, x, y, and z.
Referenced by meshdeform_add_intersections(), meshdeform_bind_floodfill(), meshdeform_boundary_total_weight(), meshdeform_check_semibound(), meshdeform_interp_w(), meshdeform_matrix_add_cell(), meshdeform_matrix_add_exterior_phi(), meshdeform_matrix_add_rhs(), and meshdeform_matrix_add_semibound_phi().
|
static |
Definition at line 1054 of file meshlaplacian.c.
References copy_v3_v3(), MDefBoundIsect::facing, MeshDeformBind::max, MeshRayCallbackData::mdb, MESHDEFORM_OFFSET, meshdeform_ray_tree_intersect(), MeshDeformBind::min, normalize_v3(), and sub_v3_v3v3().
Referenced by harmonic_coordinates_bind().
|
static |
Definition at line 1221 of file meshlaplacian.c.
References Freestyle::a, CLAMP, MeshRayCallbackData::mdb, meshdeform_index(), MeshDeformBind::phi, result, MeshDeformBind::size, x, y, and z.
Referenced by meshdeform_matrix_solve().
|
static |
Definition at line 1327 of file meshlaplacian.c.
References Freestyle::a, MeshDeformBind::boundisect, blender::compositor::context, EIG_linear_solver_matrix_add(), MeshRayCallbackData::mdb, meshdeform_boundary_total_weight(), meshdeform_index(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::tag, MeshDeformBind::varidx, MeshDeformBind::width, x, y, and z.
Referenced by meshdeform_matrix_solve().
|
static |
Definition at line 1411 of file meshlaplacian.c.
References Freestyle::a, MeshRayCallbackData::mdb, meshdeform_index(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::phi, MeshDeformBind::semibound, MeshDeformBind::tag, x, y, and z.
Referenced by meshdeform_matrix_solve().
|
static |
Definition at line 1356 of file meshlaplacian.c.
References Freestyle::a, MeshDeformBind::boundisect, blender::compositor::context, EIG_linear_solver_right_hand_side_add(), MDefBoundIsect::len, MeshRayCallbackData::mdb, meshdeform_boundary_phi(), meshdeform_boundary_total_weight(), meshdeform_index(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::tag, MeshDeformBind::varidx, x, y, and z.
Referenced by meshdeform_matrix_solve().
|
static |
Definition at line 1385 of file meshlaplacian.c.
References Freestyle::a, MeshDeformBind::boundisect, MDefBoundIsect::len, MeshRayCallbackData::mdb, meshdeform_boundary_phi(), meshdeform_boundary_total_weight(), meshdeform_index(), MeshDeformBind::phi, MeshDeformBind::semibound, x, y, and z.
Referenced by meshdeform_matrix_solve().
|
static |
Definition at line 1438 of file meshlaplacian.c.
References Freestyle::a, usdtokens::b(), BKE_modifier_set_error(), BLI_memarena_alloc(), BLI_snprintf(), MeshDeformBind::cage_verts_num, blender::compositor::context, copy_v3_v3(), MeshDeformBind::dyngrid, EIG_linear_solver_delete(), EIG_linear_solver_new(), EIG_linear_solver_solve(), EIG_linear_solver_variable_get(), error(), fabsf, MeshDeformBind::halfwidth, MeshDeformBind::inside, MeshRayCallbackData::mdb, MEM_callocN, MEM_freeN, MeshDeformBind::memarena, meshdeform_interp_w(), meshdeform_matrix_add_cell(), meshdeform_matrix_add_exterior_phi(), meshdeform_matrix_add_rhs(), meshdeform_matrix_add_semibound_phi(), MESHDEFORM_MIN_INFLUENCE, MESHDEFORM_TAG_EXTERIOR, MESHDEFORM_TAG_INTERIOR, MeshDeformBind::min, MeshDeformModifierData::modifier, MDefBindInfluence::next, MeshDeformModifierData::object, MeshDeformBind::phi, progress_bar(), MeshDeformBind::semibound, MeshDeformBind::size, MeshDeformBind::size3, MeshDeformBind::tag, MeshDeformBind::totalphi, MeshDeformBind::varidx, MDefBindInfluence::vertex, MeshDeformBind::vertexcos, MeshDeformBind::verts_num, MDefBindInfluence::weight, MeshDeformBind::weights, MeshDeformBind::width, x, y, and z.
Referenced by harmonic_coordinates_bind().
|
static |
Definition at line 984 of file meshlaplacian.c.
References BLI_array_alloca, BLI_bvhtree_ray_cast_ex(), BLI_memarena_alloc(), BVH_RAYCAST_DIST_MAX, BVH_RAYCAST_WATERTIGHT, MeshDeformBind::bvhtree, MeshDeformBind::cagecos, MeshDeformBind::cagemesh_cache, MDefBoundIsect::co, copy_v3_v3(), data, BVHTreeRayHit::dist, MDefBoundIsect::facing, float(), harmonic_ray_callback(), BVHTreeRayHit::index, interp_weights_poly_v3(), MeshDeformIsect::isect, MeshDeformIsect::lambda, len, MDefBoundIsect::len, len_v3v3(), MPoly::loopstart, MeshDeformBind::looptri, madd_v3_v3v3fl(), max_ff(), MeshRayCallbackData::mdb, MeshDeformBind::memarena, MESHDEFORM_LEN_THRESHOLD, MeshDeformBind::mloop, MeshDeformBind::mpoly, normalize_v3_v3(), NULL, MLoopTri::poly, MDefBoundIsect::poly_index, MDefBoundIsect::poly_weights, MeshDeformIsect::start, sub_v3_v3v3(), MPoly::totloop, UNLIKELY, MLoop::v, MeshDeformIsect::vec, and MeshDeformIsect::vec_length.
Referenced by meshdeform_add_intersections(), and meshdeform_inside_cage().
|
static |
Definition at line 42 of file meshlaplacian.c.
Referenced by harmonic_coordinates_bind(), and meshdeform_matrix_solve().
Definition at line 45 of file meshlaplacian.c.
Referenced by ED_mesh_deform_bind_callback().
|
static |
Definition at line 39 of file meshlaplacian.c.
Referenced by ED_mesh_deform_bind_callback().
|
static |
Definition at line 851 of file meshlaplacian.c.
Referenced by meshdeform_cell_center(), meshdeform_index(), and meshdeform_inside_cage().