The only remaining code in source/blender that must be compiled as C is now datatoc generated code and the DNA defaults that use designated initializers. Pull Request: https://projects.blender.org/blender/blender/pulls/134469
59 lines
1.6 KiB
C
59 lines
1.6 KiB
C
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup edarmature
|
|
* BIF_meshlaplacian.h: Algorithms using the mesh laplacian.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
// #define RIGID_DEFORM
|
|
|
|
struct Mesh;
|
|
struct Object;
|
|
struct bDeformGroup;
|
|
|
|
#ifdef RIGID_DEFORM
|
|
struct EditMesh;
|
|
#endif
|
|
|
|
/* Laplacian System */
|
|
|
|
struct LaplacianSystem;
|
|
typedef struct LaplacianSystem LaplacianSystem;
|
|
|
|
void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned);
|
|
void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3);
|
|
|
|
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);
|
|
|
|
/* Heat Weighting */
|
|
|
|
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);
|
|
|
|
#ifdef RIGID_DEFORM
|
|
/* As-Rigid-As-Possible Deformation */
|
|
|
|
void rigid_deform_begin(struct EditMesh *em);
|
|
void rigid_deform_iteration(void);
|
|
void rigid_deform_end(int cancel);
|
|
#endif
|
|
|
|
/* Harmonic Coordinates */
|
|
|
|
/* ED_mesh_deform_bind_callback(...) defined in ED_armature.hh */
|