|
Blender V4.3
|
#include "BLI_utildefines.h"#include "BLI_math_geom.h"#include "BLI_math_vector.h"#include "BLI_string.h"#include "BLI_utildefines_stack.h"#include "MEM_guardedalloc.h"#include "BLT_translation.hh"#include "DNA_defaults.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_screen_types.h"#include "BKE_deform.hh"#include "BKE_mesh_mapping.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "BLO_read_write.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "MOD_ui_common.hh"#include "MOD_util.hh"#include "eigen_capi.h"Go to the source code of this file.
Classes | |
| struct | LaplacianSystem |
Variables | |
| ModifierTypeInfo | modifierType_LaplacianDeform |
| anonymous enum |
Definition at line 41 of file MOD_laplaciandeform.cc.
|
static |
Definition at line 840 of file MOD_laplaciandeform.cc.
References BLO_read_float3_array(), LaplacianDeformModifierData::cache_system, LaplacianDeformModifierData::vertexco, and LaplacianDeformModifierData::verts_num.
|
static |
Definition at line 817 of file MOD_laplaciandeform.cc.
References BLI_assert, BLO_write_float3_array(), BLO_write_is_undo(), BLO_write_struct_at_address, eModifierFlag_OverrideLibrary_Local, ModifierData::flag, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, LaplacianDeformModifierData::vertexco, and LaplacianDeformModifierData::verts_num.
|
static |
Definition at line 308 of file MOD_laplaciandeform.cc.
References LaplacianSystem::co, copy_v3_v3(), MeshElemMap::count, dot_v3v3(), fabsf, MeshElemMap::indices, LaplacianSystem::no, normalize_v3(), LaplacianSystem::ringv_map, sub_v3_v3v3(), LaplacianSystem::unit_verts, and LaplacianSystem::verts_num.
Referenced by laplacianDeformPreview().
|
static |
Definition at line 731 of file MOD_laplaciandeform.cc.
References BKE_modifier_copydata_generic(), LaplacianDeformModifierData::cache_system, flag, MEM_dupallocN, and LaplacianDeformModifierData::vertexco.
|
static |
Definition at line 151 of file MOD_laplaciandeform.cc.
References blender::Span< T >::count(), blender::Span< T >::index_range(), and indices.
Referenced by initSystem().
|
static |
Definition at line 188 of file MOD_laplaciandeform.cc.
References indices.
Referenced by initSystem().
|
static |
Definition at line 760 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifier_do(), and ModifierEvalContext::object.
|
static |
Definition at line 132 of file MOD_laplaciandeform.cc.
References LaplacianSystem::co, LaplacianSystem::context, LaplacianSystem::delta, EIG_linear_solver_delete(), LaplacianSystem::index_anchors, MEM_SAFE_FREE, LaplacianSystem::no, LaplacianSystem::ringf_indices, LaplacianSystem::ringf_map, LaplacianSystem::ringv_indices, LaplacianSystem::ringv_map, LaplacianSystem::tris, and LaplacianSystem::unit_verts.
Referenced by free_data(), and LaplacianDeformModifier_do().
|
static |
Definition at line 772 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::cache_system, deleteLaplacianSystem(), MEM_SAFE_FREE, LaplacianDeformModifierData::vertexco, and LaplacianDeformModifierData::verts_num.
|
static |
Definition at line 722 of file MOD_laplaciandeform.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
This method computes the Laplacian Matrix and Differential Coordinates for all vertex in the mesh. The Linear system is LV = d Where L is Laplacian Matrix, V as the vertices in Mesh, d is the differential coordinates The Laplacian Matrix is computes as a: Lij = sum(Wij) (if i == j) Lij = Wij (if i != j) Wij is weight between vertex Vi and vertex Vj, we use cotangent weight
The Differential Coordinate is computes as a: di = Vi * sum(Wij) - sum(Wij * Vj) Where: di is the Differential Coordinate i sum (Wij) is the sum of all weights between vertex Vi and its vertices neighbors (Vj). sum (Wij * Vj) is the sum of the product between vertex neighbor Vj and weight Wij for all neighborhood.
This Laplacian Matrix is described in the paper: Desbrun M. et.al, Implicit fairing of irregular meshes using diffusion and curvature flow, SIGGRAPH '99, page 317-324, New York, USA
The computation of Laplace Beltrami operator on Hybrid Triangle/Quad Meshes is described in the paper: Pinzon A., Romero E., Shape Inflation With an Adapted Laplacian Operator For Hybrid Quad/Triangle Meshes, Conference on Graphics Patterns and Images, SIBGRAPI, 2013
The computation of Differential Coordinates is described in the paper: Sorkine, O. Laplacian Surface Editing. Proceedings of the EUROGRAPHICS/ACM SIGGRAPH Symposium on Geometry Processing,
Definition at line 255 of file MOD_laplaciandeform.cc.
References add_v3_v3(), LaplacianSystem::co, LaplacianSystem::context, cotangent_tri_weight_v3(), LaplacianSystem::delta, EIG_linear_solver_matrix_add(), LaplacianSystem::no, normal_tri_v3(), LaplacianSystem::tris, LaplacianSystem::tris_num, UNPACK3, and v2.
Referenced by laplacianDeformPreview().
|
static |
Definition at line 106 of file MOD_laplaciandeform.cc.
References LaplacianSystem::anchor_grp_name, LaplacianSystem::anchors_num, LaplacianSystem::co, LaplacianSystem::delta, LaplacianSystem::edges_num, LaplacianSystem::has_solution, LaplacianSystem::index_anchors, LaplacianSystem::is_matrix_computed, MEM_calloc_arrayN, MEM_malloc_arrayN, newLaplacianSystem(), LaplacianSystem::no, LaplacianSystem::repeat, STRNCPY, LaplacianSystem::tris, LaplacianSystem::tris_num, LaplacianSystem::unit_verts, and LaplacianSystem::verts_num.
Referenced by initSystem().
|
static |
Definition at line 528 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::anchor_grp_name, BKE_defvert_find_weight(), BLI_assert, LaplacianDeformModifierData::cache_system, LaplacianSystem::co, createFaceRingMap(), createVertRingMap(), LaplacianDeformModifierData::flag, LaplacianSystem::index_anchors, initLaplacianSystem(), isValidVertexGroup(), MEM_freeN(), MEM_malloc_arrayN, MOD_get_vgroup(), MOD_LAPLACIANDEFORM_INVERT_VGROUP, LaplacianDeformModifierData::repeat, LaplacianSystem::ringf_indices, LaplacianSystem::ringf_map, LaplacianSystem::ringv_indices, LaplacianSystem::ringv_map, blender::Span< T >::size(), STACK_DECLARE, STACK_INIT, STACK_PUSH, STACK_SIZE, LaplacianSystem::tris, LaplacianSystem::tris_num, LaplacianDeformModifierData::vertexco, and LaplacianDeformModifierData::verts_num.
Referenced by LaplacianDeformModifier_do().
|
static |
Definition at line 742 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::anchor_grp_name.
|
static |
Definition at line 591 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::anchor_grp_name, LaplacianSystem::anchor_grp_name, LaplacianSystem::anchors_num, BKE_defvert_find_weight(), LaplacianDeformModifierData::cache_system, LaplacianSystem::edges_num, LaplacianDeformModifierData::flag, LAPDEFORM_SYSTEM_CHANGE_EDGES, LAPDEFORM_SYSTEM_CHANGE_NOT_VALID_GROUP, LAPDEFORM_SYSTEM_CHANGE_VERTEXES, LAPDEFORM_SYSTEM_NOT_CHANGE, LAPDEFORM_SYSTEM_ONLY_CHANGE_ANCHORS, LAPDEFORM_SYSTEM_ONLY_CHANGE_GROUP, MOD_get_vgroup(), MOD_LAPLACIANDEFORM_INVERT_VGROUP, STREQ, and LaplacianSystem::verts_num.
Referenced by LaplacianDeformModifier_do().
|
static |
Definition at line 518 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::anchor_grp_name, and MOD_get_vgroup().
Referenced by initSystem(), and LaplacianDeformModifier_do().
|
static |
Definition at line 634 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::anchor_grp_name, LaplacianSystem::anchor_grp_name, BKE_modifier_set_error(), LaplacianDeformModifierData::cache_system, deleteLaplacianSystem(), LaplacianSystem::edges_num, ELEM, LaplacianDeformModifierData::flag, float, LaplacianSystem::has_solution, initSystem(), LaplacianSystem::is_matrix_computed, isSystemDifferent(), isValidVertexGroup(), LAPDEFORM_SYSTEM_CHANGE_EDGES, LAPDEFORM_SYSTEM_CHANGE_NOT_VALID_GROUP, LAPDEFORM_SYSTEM_CHANGE_VERTEXES, LAPDEFORM_SYSTEM_ONLY_CHANGE_ANCHORS, LAPDEFORM_SYSTEM_ONLY_CHANGE_GROUP, laplacianDeformPreview(), MEM_malloc_arrayN, MEM_SAFE_FREE, MOD_LAPLACIANDEFORM_BIND, LaplacianDeformModifierData::modifier, LaplacianDeformModifierData::repeat, LaplacianSystem::repeat, LaplacianDeformModifierData::vertexco, and LaplacianDeformModifierData::verts_num.
Referenced by deform_verts().
|
static |
Definition at line 401 of file MOD_laplaciandeform.cc.
References LaplacianSystem::anchors_num, LaplacianSystem::co, computeImplictRotations(), LaplacianSystem::context, LaplacianSystem::delta, EIG_linear_least_squares_solver_new(), EIG_linear_solver_matrix_add(), EIG_linear_solver_right_hand_side_add(), EIG_linear_solver_solve(), EIG_linear_solver_variable_get(), EIG_linear_solver_variable_set(), LaplacianSystem::has_solution, LaplacianSystem::index_anchors, initLaplacianMatrix(), LaplacianSystem::is_matrix_computed, LaplacianSystem::repeat, rotateDifferentialCoordinates(), and LaplacianSystem::verts_num.
Referenced by LaplacianDeformModifier_do().
|
static |
Definition at line 90 of file MOD_laplaciandeform.cc.
References LaplacianSystem::anchor_grp_name, LaplacianSystem::anchors_num, LaplacianSystem::edges_num, LaplacianSystem::has_solution, LaplacianSystem::is_matrix_computed, LaplacianSystem::repeat, LaplacianSystem::tris_num, and LaplacianSystem::verts_num.
Referenced by initLaplacianSystem().
Definition at line 783 of file MOD_laplaciandeform.cc.
References IFACE_, Panel::layout, modifier_panel_end(), modifier_panel_get_property_pointers(), modifier_vgroup_ui(), ptr, RNA_boolean_get(), RNA_string_length(), UI_ITEM_NONE, uiItemO(), uiItemR(), uiItemS(), uiLayoutRow(), uiLayoutSetEnabled(), and uiLayoutSetPropSep().
Referenced by panel_register().
|
static |
Definition at line 812 of file MOD_laplaciandeform.cc.
References eModifierType_LaplacianDeform, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 751 of file MOD_laplaciandeform.cc.
References LaplacianDeformModifierData::anchor_grp_name, CD_MASK_MDEFORMVERT, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 333 of file MOD_laplaciandeform.cc.
References add_v3_v3(), beta(), LaplacianSystem::co, LaplacianSystem::context, copy_v3_v3(), MeshElemMap::count, cross_v3_v3v3(), LaplacianSystem::delta, dot_v3v3(), EIG_linear_solver_right_hand_side_add(), EIG_linear_solver_variable_get(), MeshElemMap::indices, len_squared_v3(), mul_v3_v3fl(), LaplacianSystem::no, normal_tri_v3(), normalize_v3(), LaplacianSystem::ringf_map, sub_v3_v3(), sub_v3_v3v3(), LaplacianSystem::tris, LaplacianSystem::unit_verts, UNPACK3, LaplacianSystem::verts_num, and zero_v3().
Referenced by laplacianDeformPreview().
| ModifierTypeInfo modifierType_LaplacianDeform |
Definition at line 848 of file MOD_laplaciandeform.cc.