|
Blender V4.5
|
#include "MEM_guardedalloc.h"#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "BLI_map.hh"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_memarena.h"#include "BLI_ordered_edge.hh"#include "BLI_string.h"#include "BLT_translation.hh"#include "BKE_attribute.hh"#include "BKE_bvhutils.hh"#include "BKE_mesh.hh"#include "BKE_mesh_wrapper.hh"#include "BKE_modifier.hh"#include "ED_armature.hh"#include "ED_mesh.hh"#include "ED_object_vgroup.hh"#include "eigen_capi.h"#include "meshlaplacian.h"#include <algorithm>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 |
Functions | |
| static void | waitcursor (int) |
| static void | progress_bar (int, const char *) |
| static void | start_progress_bar () |
| static void | end_progress_bar () |
| static void | error (const char *str) |
| static void | laplacian_increase_edge_count (blender::Map< blender::OrderedEdge, int > &edgehash, int v1, int v2) |
| static int | laplacian_edge_count (const blender::Map< blender::OrderedEdge, int > &edgehash, int v1, int v2) |
| static void | laplacian_triangle_area (LaplacianSystem *sys, int i1, int i2, int i3) |
| static void | laplacian_triangle_weights (LaplacianSystem *sys, int f, int i1, int i2, int i3) |
| static LaplacianSystem * | laplacian_system_construct_begin (int verts_num, int faces_num, int lsq) |
| void | laplacian_add_vertex (LaplacianSystem *sys, float *co, int pinned) |
| void | laplacian_add_triangle (LaplacianSystem *sys, int v1, int v2, int v3) |
| static void | laplacian_system_construct_end (LaplacianSystem *sys) |
| static void | laplacian_system_delete (LaplacianSystem *sys) |
| void | laplacian_begin_solve (LaplacianSystem *sys, int index) |
| void | laplacian_add_right_hand_side (LaplacianSystem *sys, int v, float value) |
| int | laplacian_system_solve (LaplacianSystem *sys) |
| float | laplacian_system_get_solution (LaplacianSystem *sys, int v) |
| static void | bvh_callback (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static void | heat_ray_tree_create (LaplacianSystem *sys) |
| static int | heat_ray_source_visible (LaplacianSystem *sys, int vertex, int source) |
| static float | heat_source_distance (LaplacianSystem *sys, int vertex, int source) |
| static int | heat_source_closest (LaplacianSystem *sys, int vertex, int source) |
| static void | heat_set_H (LaplacianSystem *sys, int vertex) |
| static void | heat_calc_vnormals (LaplacianSystem *sys) |
| static void | heat_laplacian_create (LaplacianSystem *sys) |
| static void | heat_system_free (LaplacianSystem *sys) |
| static float | heat_limit_weight (float weight) |
| void | heat_bone_weighting (Object *ob, Mesh *mesh, float(*verts)[3], int numbones, bDeformGroup **dgrouplist, bDeformGroup **dgroupflip, float(*root)[3], float(*tip)[3], const bool *selected, const char **r_error_str) |
| static void | harmonic_ray_callback (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit) |
| static MDefBoundIsect * | meshdeform_ray_tree_intersect (MeshDeformBind *mdb, const float co1[3], const float co2[3]) |
| static int | meshdeform_inside_cage (MeshDeformBind *mdb, float *co) |
| BLI_INLINE int | meshdeform_index (MeshDeformBind *mdb, int x, int y, int z, int n) |
| BLI_INLINE void | meshdeform_cell_center (MeshDeformBind *mdb, int x, int y, int z, int n, float *center) |
| static void | meshdeform_add_intersections (MeshDeformBind *mdb, int x, int y, int z) |
| static void | meshdeform_bind_floodfill (MeshDeformBind *mdb) |
| static float | meshdeform_boundary_phi (const MeshDeformBind *mdb, const MDefBoundIsect *isect, int cagevert) |
| static float | meshdeform_interp_w (MeshDeformBind *mdb, const float *gridvec, float *, int) |
| static void | meshdeform_check_semibound (MeshDeformBind *mdb, int x, int y, int z) |
| static float | meshdeform_boundary_total_weight (MeshDeformBind *mdb, int x, int y, int z) |
| static void | meshdeform_matrix_add_cell (MeshDeformBind *mdb, LinearSolver *context, int x, int y, int z) |
| static void | meshdeform_matrix_add_rhs (MeshDeformBind *mdb, LinearSolver *context, int x, int y, int z, int cagevert) |
| static void | meshdeform_matrix_add_semibound_phi (MeshDeformBind *mdb, int x, int y, int z, int cagevert) |
| static void | meshdeform_matrix_add_exterior_phi (MeshDeformBind *mdb, int x, int y, int z, int) |
| static void | meshdeform_matrix_solve (MeshDeformModifierData *mmd, MeshDeformBind *mdb) |
| static void | harmonic_coordinates_bind (MeshDeformModifierData *mmd, MeshDeformBind *mdb) |
| void | ED_mesh_deform_bind_callback (Object *object, MeshDeformModifierData *mmd, Mesh *cagemesh, float *vertexcos, int verts_num, float cagemat[4][4]) |
Variables | |
| static const int | MESHDEFORM_OFFSET [7][3] |
Algorithms using the mesh laplacian.
Definition in file meshlaplacian.cc.
| #define C_WEIGHT 1.0f |
Definition at line 358 of file meshlaplacian.cc.
Referenced by heat_set_H().
| #define DISTANCE_EPSILON 1e-4f |
Definition at line 361 of file meshlaplacian.cc.
Referenced by heat_source_closest().
| #define EPSILON 0.0001f |
Definition at line 845 of file meshlaplacian.cc.
| #define MESHDEFORM_LEN_THRESHOLD 1e-6f |
minimum length for MDefBoundIsect.len
Definition at line 853 of file meshlaplacian.cc.
Referenced by meshdeform_ray_tree_intersect().
| #define MESHDEFORM_MIN_INFLUENCE 0.0005f |
Definition at line 855 of file meshlaplacian.cc.
Referenced by BKE_modifier_mdef_compact_influences(), and meshdeform_matrix_solve().
| #define MESHDEFORM_TAG_BOUNDARY 1 |
Definition at line 848 of file meshlaplacian.cc.
Referenced by meshdeform_add_intersections(), and meshdeform_bind_floodfill().
| #define MESHDEFORM_TAG_EXTERIOR 3 |
Definition at line 850 of file meshlaplacian.cc.
Referenced by meshdeform_bind_floodfill(), meshdeform_check_semibound(), meshdeform_matrix_add_cell(), meshdeform_matrix_add_exterior_phi(), meshdeform_matrix_add_rhs(), and meshdeform_matrix_solve().
| #define MESHDEFORM_TAG_INTERIOR 2 |
Definition at line 849 of file meshlaplacian.cc.
Referenced by meshdeform_bind_floodfill(), and meshdeform_matrix_solve().
| #define MESHDEFORM_TAG_UNTYPED 0 |
Definition at line 847 of file meshlaplacian.cc.
Referenced by harmonic_coordinates_bind(), and meshdeform_bind_floodfill().
| #define WEIGHT_LIMIT_END 0.025f |
Definition at line 360 of file meshlaplacian.cc.
Referenced by heat_limit_weight().
| #define WEIGHT_LIMIT_START 0.05f |
Definition at line 359 of file meshlaplacian.cc.
Referenced by heat_limit_weight().
|
static |
Definition at line 369 of file meshlaplacian.cc.
References bvh_callback(), data, BVHTreeRayHit::dist, dot_v3v3(), BVHTreeRayHit::index, BVHTreeRay::isect_precalc, isect_ray_tri_v3(), isect_ray_tri_watertight_v3(), normal_tri_v3(), UNPACK3, and UNUSED_VARS.
Referenced by bvh_callback(), and 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 1745 of file meshlaplacian.cc.
References 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, copy_m4_m4(), copy_v3_v3(), ED_mesh_deform_bind_callback(), end_progress_bar(), harmonic_coordinates_bind(), MEM_callocN(), MEM_freeN(), MeshDeformModifierData::modifier, mul_m4_v3(), mul_v3_m4v3(), MeshDeformModifierData::object, start_progress_bar(), MeshDeformBind::vertexcos, Mesh::verts_num, MeshDeformBind::verts_num, MeshDeformModifierData::verts_num, and waitcursor().
Referenced by ED_mesh_deform_bind_callback(), ED_pose_deselect_all_multi_ex(), and blender::ed::object::meshdeform_bind_exec().
|
static |
Definition at line 46 of file meshlaplacian.cc.
References end_progress_bar().
Referenced by ED_mesh_deform_bind_callback(), and end_progress_bar().
|
static |
Definition at line 47 of file meshlaplacian.cc.
Referenced by meshdeform_matrix_solve().
|
static |
Definition at line 1578 of file meshlaplacian.cc.
References b, MeshDeformModifierData::bindweights, BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_memarena_use_calloc(), MeshDeformBind::boundisect, MeshDeformBind::bvhdata, MeshDeformBind::bvhtree, MeshDeformBind::cage_verts_num, MeshDeformBind::cagecos, MeshDeformBind::cagemesh, MeshDeformBind::cagemesh_cache, copy_v3_v3(), MeshDeformModifierData::dyncellmin, MeshDeformModifierData::dyncellwidth, MeshDeformBind::dyngrid, MeshDeformModifierData::dyngrid, MeshDeformModifierData::dyngridsize, MeshDeformModifierData::dyninfluences, MeshDeformModifierData::dynverts, MeshDeformModifierData::flag, MeshDeformModifierData::gridsize, MeshDeformBind::halfwidth, harmonic_coordinates_bind(), MDefCell::influences_num, MeshDeformModifierData::influences_num, INIT_MINMAX, MeshDeformBind::inside, MeshDeformBind::max, MEM_calloc_arrayN(), 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(), MOD_MDEF_DYNAMIC_BIND, MDefBindInfluence::next, MDefCell::offset, MeshDeformBind::phi, progress_bar(), MeshDeformBind::semibound, MeshDeformBind::size, MeshDeformBind::size3, MeshDeformBind::tag, MeshDeformBind::totalphi, blender::bke::BVHTreeFromMesh::tree, 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(), and harmonic_coordinates_bind().
|
static |
Definition at line 944 of file meshlaplacian.cc.
References MeshDeformBind::cagecos, MeshDeformBind::cagemesh_cache, BVHTreeRayHit::co, copy_v3_v3(), data, BVHTreeRay::direction, BVHTreeRayHit::dist, dot_v3v3(), harmonic_ray_callback(), BVHTreeRayHit::index, blender::Span< T >::is_empty(), MeshDeformIsect::isect, BVHTreeRay::isect_precalc, isect_ray_tri_watertight_v3(), MeshDeformIsect::lambda, madd_v3_v3v3fl(), normal_tri_v3(), BVHTreeRay::origin, UNPACK3, and MeshDeformIsect::vec_length.
Referenced by harmonic_ray_callback(), and meshdeform_ray_tree_intersect().
| void heat_bone_weighting | ( | Object * | ob, |
| Mesh * | mesh, | ||
| float(*) | verts[3], | ||
| int | numbones, | ||
| bDeformGroup ** | dgrouplist, | ||
| bDeformGroup ** | dgroupflip, | ||
| float(*) | root[3], | ||
| float(*) | tip[3], | ||
| const bool * | selected, | ||
| const char ** | r_error_str ) |
Definition at line 627 of file meshlaplacian.cc.
References Geometry::attributes, LaplacianSystem::HeatWeighting::corner_tris, blender::bke::mesh::corner_tris_calc(), LaplacianSystem::HeatWeighting::corner_verts, Mesh::corners_num, Mesh::editflag, blender::bke::Face, Mesh::faces_num, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_bone_weighting(), heat_laplacian_create(), heat_limit_weight(), heat_ray_tree_create(), heat_source_closest(), heat_system_free(), i, blender::offset_indices::OffsetIndices< T >::index_range(), 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(), blender::bke::AttributeAccessor::lookup_or_default(), mask(), ME_EDIT_MIRROR_TOPO, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, MEM_calloc_arrayN(), MEM_freeN(), MEM_mallocN(), mesh_get_x_mirror_vert(), Object::mode, N_, LaplacianSystem::HeatWeighting::numsource, OB_MODE_WEIGHT_PAINT, LaplacianSystem::HeatWeighting::p, blender::bke::Point, poly_to_tri_count(), LaplacianSystem::HeatWeighting::root, blender::Span< T >::slice(), LaplacianSystem::HeatWeighting::tip, LaplacianSystem::HeatWeighting::tris_num, LaplacianSystem::HeatWeighting::verts, LaplacianSystem::HeatWeighting::verts_num, Mesh::verts_num, blender::ed::object::vgroup_vert_add(), blender::ed::object::vgroup_vert_remove(), blender::ed::object::vgroup_vert_weight(), WEIGHT_ADD, and WEIGHT_REPLACE.
Referenced by add_verts_to_dgroups(), and heat_bone_weighting().
|
static |
Definition at line 542 of file meshlaplacian.cc.
References LaplacianSystem::faces, for(), LaplacianSystem::heat, heat_calc_vnormals(), MEM_callocN(), normalize_v3(), v2, LaplacianSystem::HeatWeighting::vert_normals, and LaplacianSystem::verts_num.
Referenced by heat_calc_vnormals(), and heat_laplacian_create().
|
static |
Definition at line 567 of file meshlaplacian.cc.
References LaplacianSystem::HeatWeighting::corner_tris, LaplacianSystem::HeatWeighting::corner_verts, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_calc_vnormals(), heat_laplacian_create(), heat_set_H(), laplacian_add_triangle(), laplacian_add_vertex(), MEM_calloc_arrayN(), LaplacianSystem::HeatWeighting::mindist, LaplacianSystem::HeatWeighting::p, LaplacianSystem::HeatWeighting::tris_num, UNPACK3, LaplacianSystem::HeatWeighting::verts, and LaplacianSystem::HeatWeighting::verts_num.
Referenced by heat_bone_weighting(), and heat_laplacian_create().
|
static |
Definition at line 613 of file meshlaplacian.cc.
References heat_limit_weight(), WEIGHT_LIMIT_END, and WEIGHT_LIMIT_START.
Referenced by heat_bone_weighting(), and heat_limit_weight().
|
static |
Definition at line 440 of file meshlaplacian.cc.
References BLI_bvhtree_ray_cast(), bvh_callback(), LaplacianSystem::HeatWeighting::bvhtree, closest_to_line_segment_v3(), copy_v3_v3(), data, BVHTreeRayHit::dist, e, LaplacianSystem::heat, heat_ray_source_visible(), BVHTreeRayHit::index, madd_v3_v3v3fl(), mul_v3_fl(), normalize_v3(), LaplacianSystem::HeatWeighting::root, sub_v3_v3v3(), LaplacianSystem::HeatWeighting::tip, LaplacianSystem::HeatWeighting::verts, and LaplacianSystem::HeatWeighting::vltree.
Referenced by heat_ray_source_visible(), and heat_source_closest().
|
static |
Definition at line 402 of file meshlaplacian.cc.
References BLI_bvhtree_balance(), BLI_bvhtree_insert(), BLI_bvhtree_new(), LaplacianSystem::HeatWeighting::bvhtree, LaplacianSystem::HeatWeighting::corner_tris, LaplacianSystem::HeatWeighting::corner_verts, LaplacianSystem::heat, heat_ray_tree_create(), INIT_MINMAX, MEM_callocN(), minmax_v3v3_v3(), LaplacianSystem::HeatWeighting::tris_num, LaplacianSystem::HeatWeighting::verts, LaplacianSystem::HeatWeighting::verts_num, and LaplacianSystem::HeatWeighting::vltree.
Referenced by heat_bone_weighting(), and heat_ray_tree_create().
|
static |
Definition at line 505 of file meshlaplacian.cc.
References C_WEIGHT, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_set_H(), heat_source_closest(), heat_source_distance(), max_ff(), LaplacianSystem::HeatWeighting::mindist, LaplacianSystem::HeatWeighting::numsource, and LaplacianSystem::HeatWeighting::p.
Referenced by heat_laplacian_create(), and heat_set_H().
|
static |
Definition at line 490 of file meshlaplacian.cc.
References DISTANCE_EPSILON, heat_ray_source_visible(), heat_source_closest(), and heat_source_distance().
Referenced by heat_bone_weighting(), heat_set_H(), and heat_source_closest().
|
static |
Definition at line 473 of file meshlaplacian.cc.
References closest(), closest_to_line_segment_v3(), dot_v3v3(), LaplacianSystem::heat, heat_source_distance(), normalize_v3(), LaplacianSystem::HeatWeighting::root, sub_v3_v3v3(), LaplacianSystem::HeatWeighting::tip, LaplacianSystem::HeatWeighting::vert_normals, and LaplacianSystem::HeatWeighting::verts.
Referenced by heat_set_H(), heat_source_closest(), and heat_source_distance().
|
static |
Definition at line 601 of file meshlaplacian.cc.
References BLI_bvhtree_free(), LaplacianSystem::HeatWeighting::bvhtree, LaplacianSystem::HeatWeighting::corner_tris, LaplacianSystem::HeatWeighting::H, LaplacianSystem::heat, heat_system_free(), MEM_freeN(), LaplacianSystem::HeatWeighting::mindist, LaplacianSystem::HeatWeighting::p, LaplacianSystem::HeatWeighting::vert_normals, and LaplacianSystem::HeatWeighting::vltree.
Referenced by heat_bone_weighting(), and heat_system_free().
| void laplacian_add_right_hand_side | ( | LaplacianSystem * | sys, |
| int | v, | ||
| float | value ) |
Definition at line 335 of file meshlaplacian.cc.
References LaplacianSystem::context, EIG_linear_solver_right_hand_side_add(), laplacian_add_right_hand_side(), and v.
Referenced by heat_bone_weighting(), and laplacian_add_right_hand_side().
| void laplacian_add_triangle | ( | LaplacianSystem * | sys, |
| int | v1, | ||
| int | v2, | ||
| int | v3 ) |
Definition at line 234 of file meshlaplacian.cc.
References LaplacianSystem::faces, LaplacianSystem::faces_num, laplacian_add_triangle(), and v2.
Referenced by heat_laplacian_create(), and laplacian_add_triangle().
| void laplacian_add_vertex | ( | LaplacianSystem * | sys, |
| float * | co, | ||
| int | pinned ) |
Definition at line 227 of file meshlaplacian.cc.
References laplacian_add_vertex(), LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::vpinned.
Referenced by heat_laplacian_create(), and laplacian_add_vertex().
| void laplacian_begin_solve | ( | LaplacianSystem * | sys, |
| int | index ) |
Definition at line 317 of file meshlaplacian.cc.
References LaplacianSystem::context, EIG_linear_solver_variable_lock(), EIG_linear_solver_variable_set(), laplacian_begin_solve(), LaplacianSystem::variablesdone, LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::vpinned.
Referenced by heat_bone_weighting(), laplacian_begin_solve(), and laplacian_system_construct_end().
|
static |
Definition at line 111 of file meshlaplacian.cc.
References laplacian_edge_count(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), and v2.
Referenced by laplacian_edge_count(), and laplacian_triangle_weights().
|
static |
Definition at line 103 of file meshlaplacian.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_or_modify(), laplacian_increase_edge_count(), and v2.
Referenced by laplacian_increase_edge_count(), and laplacian_system_construct_end().
|
static |
Definition at line 199 of file meshlaplacian.cc.
References LaplacianSystem::areaweights, LaplacianSystem::context, EIG_linear_least_squares_solver_new(), EIG_linear_solver_new(), LaplacianSystem::faces, LaplacianSystem::faces_num, laplacian_system_construct_begin(), MEM_calloc_arrayN(), MEM_callocN(), LaplacianSystem::storeweights, LaplacianSystem::verts, LaplacianSystem::verts_num, and LaplacianSystem::vpinned.
Referenced by heat_bone_weighting(), and laplacian_system_construct_begin().
|
static |
Definition at line 242 of file meshlaplacian.cc.
References LaplacianSystem::areaweights, 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_system_construct_end(), laplacian_triangle_area(), laplacian_triangle_weights(), MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), MEM_SAFE_FREE, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), LaplacianSystem::storeweights, LaplacianSystem::varea, and LaplacianSystem::verts_num.
Referenced by heat_bone_weighting(), and laplacian_system_construct_end().
|
static |
Definition at line 295 of file meshlaplacian.cc.
References LaplacianSystem::context, EIG_linear_solver_delete(), LaplacianSystem::faces, LaplacianSystem::fweights, laplacian_system_delete(), MEM_freeN(), LaplacianSystem::varea, LaplacianSystem::verts, and LaplacianSystem::vpinned.
Referenced by heat_bone_weighting(), and laplacian_system_delete().
| float laplacian_system_get_solution | ( | LaplacianSystem * | sys, |
| int | v ) |
Definition at line 349 of file meshlaplacian.cc.
References LaplacianSystem::context, EIG_linear_solver_variable_get(), laplacian_system_get_solution(), and v.
Referenced by heat_bone_weighting(), and laplacian_system_get_solution().
| int laplacian_system_solve | ( | LaplacianSystem * | sys | ) |
Definition at line 340 of file meshlaplacian.cc.
References LaplacianSystem::context, EIG_linear_solver_solve(), laplacian_system_solve(), and LaplacianSystem::variablesdone.
Referenced by heat_bone_weighting(), and laplacian_system_solve().
|
static |
Definition at line 118 of file meshlaplacian.cc.
References angle_v3v3v3(), area_tri_v3(), cotangent_tri_weight_v3(), DEG2RADF, laplacian_triangle_area(), len_v3v3(), v2, LaplacianSystem::varea, and LaplacianSystem::verts.
Referenced by laplacian_system_construct_end(), and laplacian_triangle_area().
|
static |
Definition at line 164 of file meshlaplacian.cc.
References LaplacianSystem::context, cotangent_tri_weight_v3(), LaplacianSystem::edgehash, EIG_linear_solver_matrix_add(), LaplacianSystem::fweights, laplacian_edge_count(), laplacian_triangle_weights(), LaplacianSystem::storeweights, v2, LaplacianSystem::varea, and LaplacianSystem::verts.
Referenced by laplacian_system_construct_end(), and laplacian_triangle_weights().
|
static |
Definition at line 1124 of file meshlaplacian.cc.
References MeshDeformBind::boundisect, i, meshdeform_add_intersections(), meshdeform_cell_center(), meshdeform_index(), meshdeform_ray_tree_intersect(), MESHDEFORM_TAG_BOUNDARY, MeshDeformBind::tag, x, y, and z().
Referenced by harmonic_coordinates_bind(), and meshdeform_add_intersections().
|
static |
Definition at line 1149 of file meshlaplacian.cc.
References b, MeshDeformBind::boundisect, i, MEM_calloc_arrayN(), MEM_freeN(), meshdeform_bind_floodfill(), meshdeform_index(), MESHDEFORM_TAG_BOUNDARY, MESHDEFORM_TAG_EXTERIOR, MESHDEFORM_TAG_INTERIOR, MESHDEFORM_TAG_UNTYPED, printf, MeshDeformBind::semibound, MeshDeformBind::size, size(), MeshDeformBind::size3, and MeshDeformBind::tag.
Referenced by harmonic_coordinates_bind(), and meshdeform_bind_floodfill().
|
static |
Definition at line 1217 of file meshlaplacian.cc.
References MeshDeformBind::cagemesh_cache, MDefBoundIsect::face_index, i, meshdeform_boundary_phi(), MDefBoundIsect::poly_weights, and blender::IndexRange::size().
Referenced by meshdeform_boundary_phi(), meshdeform_matrix_add_rhs(), and meshdeform_matrix_add_semibound_phi().
|
static |
Definition at line 1310 of file meshlaplacian.cc.
References MeshDeformBind::boundisect, i, MDefBoundIsect::len, meshdeform_boundary_total_weight(), meshdeform_index(), MeshDeformBind::semibound, MeshDeformBind::width, x, y, and z().
Referenced by meshdeform_boundary_total_weight(), 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 1112 of file meshlaplacian.cc.
References BLI_INLINE, MeshDeformBind::halfwidth, meshdeform_cell_center(), MESHDEFORM_OFFSET, MeshDeformBind::min, MeshDeformBind::width, x, y, and z().
Referenced by meshdeform_add_intersections(), and meshdeform_cell_center().
|
static |
Definition at line 1294 of file meshlaplacian.cc.
References MeshDeformBind::boundisect, i, meshdeform_check_semibound(), meshdeform_index(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::semibound, MeshDeformBind::tag, x, y, and z().
Referenced by harmonic_coordinates_bind(), and meshdeform_check_semibound().
| BLI_INLINE int meshdeform_index | ( | MeshDeformBind * | mdb, |
| int | x, | ||
| int | y, | ||
| int | z, | ||
| int | n ) |
Definition at line 1091 of file meshlaplacian.cc.
References BLI_INLINE, meshdeform_index(), MESHDEFORM_OFFSET, MeshDeformBind::size, size(), x, y, and z().
Referenced by meshdeform_add_intersections(), meshdeform_bind_floodfill(), meshdeform_boundary_total_weight(), meshdeform_check_semibound(), meshdeform_index(), 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 1065 of file meshlaplacian.cc.
References copy_v3_v3(), MDefBoundIsect::facing, i, MeshDeformBind::max, meshdeform_inside_cage(), MESHDEFORM_OFFSET, meshdeform_ray_tree_intersect(), MeshDeformBind::min, normalize_v3(), and sub_v3_v3v3().
Referenced by harmonic_coordinates_bind(), and meshdeform_inside_cage().
|
static |
Definition at line 1233 of file meshlaplacian.cc.
References CLAMP, i, meshdeform_index(), meshdeform_interp_w(), MeshDeformBind::phi, result, MeshDeformBind::size, x, y, and z().
Referenced by meshdeform_interp_w(), and meshdeform_matrix_solve().
|
static |
Definition at line 1339 of file meshlaplacian.cc.
References MeshDeformBind::boundisect, EIG_linear_solver_matrix_add(), i, meshdeform_boundary_total_weight(), meshdeform_index(), meshdeform_matrix_add_cell(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::tag, MeshDeformBind::varidx, MeshDeformBind::width, x, y, and z().
Referenced by meshdeform_matrix_add_cell(), and meshdeform_matrix_solve().
|
static |
Definition at line 1423 of file meshlaplacian.cc.
References i, meshdeform_index(), meshdeform_matrix_add_exterior_phi(), MESHDEFORM_TAG_EXTERIOR, MeshDeformBind::phi, MeshDeformBind::semibound, MeshDeformBind::tag, x, y, and z().
Referenced by meshdeform_matrix_add_exterior_phi(), and meshdeform_matrix_solve().
|
static |
Definition at line 1368 of file meshlaplacian.cc.
References MeshDeformBind::boundisect, EIG_linear_solver_right_hand_side_add(), i, MDefBoundIsect::len, meshdeform_boundary_phi(), meshdeform_boundary_total_weight(), meshdeform_index(), meshdeform_matrix_add_rhs(), MESHDEFORM_TAG_EXTERIOR, rhs, MeshDeformBind::tag, MeshDeformBind::varidx, x, y, and z().
Referenced by meshdeform_matrix_add_rhs(), and meshdeform_matrix_solve().
|
static |
Definition at line 1397 of file meshlaplacian.cc.
References MeshDeformBind::boundisect, i, MDefBoundIsect::len, meshdeform_boundary_phi(), meshdeform_boundary_total_weight(), meshdeform_index(), meshdeform_matrix_add_semibound_phi(), MeshDeformBind::phi, rhs, MeshDeformBind::semibound, x, y, and z().
Referenced by meshdeform_matrix_add_semibound_phi(), and meshdeform_matrix_solve().
|
static |
Definition at line 1450 of file meshlaplacian.cc.
References b, BKE_modifier_set_error(), BLI_memarena_alloc(), MeshDeformBind::cage_verts_num, 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, MEM_calloc_arrayN(), 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_matrix_solve(), MESHDEFORM_MIN_INFLUENCE, MESHDEFORM_TAG_EXTERIOR, MESHDEFORM_TAG_INTERIOR, MeshDeformBind::min, MeshDeformModifierData::modifier, MDefBindInfluence::next, MeshDeformModifierData::object, MeshDeformBind::phi, printf, progress_bar(), MeshDeformBind::semibound, MeshDeformBind::size, MeshDeformBind::size3, SNPRINTF, 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(), and meshdeform_matrix_solve().
|
static |
Definition at line 990 of file meshlaplacian.cc.
References 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(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), data, BVHTreeRayHit::dist, MDefBoundIsect::face_index, MDefBoundIsect::facing, harmonic_ray_callback(), i, BVHTreeRayHit::index, interp_weights_poly_v3(), MeshDeformIsect::isect, MeshDeformIsect::lambda, len(), MDefBoundIsect::len, len_v3v3(), madd_v3_v3v3fl(), max_ff(), MeshDeformBind::memarena, MESHDEFORM_LEN_THRESHOLD, meshdeform_ray_tree_intersect(), normalize_v3_v3(), MDefBoundIsect::poly_weights, blender::IndexRange::size(), MeshDeformIsect::start, sub_v3_v3v3(), UNLIKELY, MeshDeformIsect::vec, and MeshDeformIsect::vec_length.
Referenced by meshdeform_add_intersections(), meshdeform_inside_cage(), and meshdeform_ray_tree_intersect().
|
static |
Definition at line 44 of file meshlaplacian.cc.
References progress_bar().
Referenced by harmonic_coordinates_bind(), meshdeform_matrix_solve(), and progress_bar().
|
static |
Definition at line 45 of file meshlaplacian.cc.
References start_progress_bar().
Referenced by ED_mesh_deform_bind_callback(), and start_progress_bar().
|
static |
Definition at line 43 of file meshlaplacian.cc.
References waitcursor().
Referenced by ED_mesh_deform_bind_callback(), and waitcursor().
|
static |
Definition at line 857 of file meshlaplacian.cc.
Referenced by meshdeform_cell_center(), meshdeform_index(), and meshdeform_inside_cage().