Blender V5.3
meshlaplacian.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9
10#pragma once
11
12namespace blender {
13
14// #define RIGID_DEFORM
15
16struct Mesh;
17struct Object;
18struct bDeformGroup;
19
20#ifdef RIGID_DEFORM
21struct EditMesh;
22#endif
23
24/* Laplacian System */
25
26struct LaplacianSystem;
27struct LaplacianSystem;
28
29void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned);
30void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3);
31
33void laplacian_add_right_hand_side(LaplacianSystem *sys, int v, float value);
36
37/* Heat Weighting */
38
39void heat_bone_weighting(struct Object *ob,
40 struct Mesh *mesh,
41 float (*verts)[3],
42 int numbones,
43 struct bDeformGroup **dgrouplist,
44 struct bDeformGroup **dgroupflip,
45 float (*root)[3],
46 float (*tip)[3],
47 const bool *selected,
48 const char **r_error_str);
49
50#ifdef RIGID_DEFORM
51/* As-Rigid-As-Possible Deformation */
52
53void rigid_deform_begin(struct EditMesh *em);
54void rigid_deform_iteration(void);
55void rigid_deform_end(int cancel);
56#endif
57
58/* Harmonic Coordinates */
59
60/* ED_mesh_deform_bind_callback(...) defined in ED_armature.hh */
61
62} // namespace blender
BMesh Iterators.
int laplacian_system_solve(LaplacianSystem *sys)
void laplacian_begin_solve(LaplacianSystem *sys, int index)
void laplacian_add_right_hand_side(LaplacianSystem *sys, int v, float value)
void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned)
ATTR_WARN_UNUSED_RESULT const BMVert * v
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)
float laplacian_system_get_solution(LaplacianSystem *sys, int v)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3)