Blender V5.0
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
12// #define RIGID_DEFORM
13
14struct Mesh;
15struct Object;
16struct bDeformGroup;
17
18#ifdef RIGID_DEFORM
19struct EditMesh;
20#endif
21
22/* Laplacian System */
23
24struct LaplacianSystem;
26
27void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned);
28void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3);
29
30void laplacian_begin_solve(LaplacianSystem *sys, int index);
31void laplacian_add_right_hand_side(LaplacianSystem *sys, int v, float value);
34
35/* Heat Weighting */
36
37void heat_bone_weighting(struct Object *ob,
38 struct Mesh *mesh,
39 float (*verts)[3],
40 int numbones,
41 struct bDeformGroup **dgrouplist,
42 struct bDeformGroup **dgroupflip,
43 float (*root)[3],
44 float (*tip)[3],
45 const bool *selected,
46 const char **r_error_str);
47
48#ifdef RIGID_DEFORM
49/* As-Rigid-As-Possible Deformation */
50
51void rigid_deform_begin(struct EditMesh *em);
52void rigid_deform_iteration(void);
53void rigid_deform_end(int cancel);
54#endif
55
56/* Harmonic Coordinates */
57
58/* ED_mesh_deform_bind_callback(...) defined in ED_armature.hh */
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
static float verts[][3]
float laplacian_system_get_solution(LaplacianSystem *sys, int v)
void laplacian_add_right_hand_side(LaplacianSystem *sys, int v, float value)
int laplacian_system_solve(LaplacianSystem *sys)
void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3)
void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned)
void heat_bone_weighting(struct Object *ob, struct Mesh *mesh, float(*verts)[3], int numbones, struct bDeformGroup **dgrouplist, struct bDeformGroup **dgroupflip, float(*root)[3], float(*tip)[3], const bool *selected, const char **r_error_str)
void laplacian_begin_solve(LaplacianSystem *sys, int index)