Blender V4.3
BKE_softbody.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4#pragma once
5
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14struct Depsgraph;
15struct Object;
16struct Scene;
17struct SoftBody;
18
19typedef struct BodyPoint {
20 float origS[3], origE[3], origT[3], pos[3], vec[3], force[3];
21 float goal;
22 float prevpos[3], prevvec[3], prevdx[3], prevdv[3]; /* used for Heun integration */
23 float impdv[3], impdx[3];
25 int *springs;
27 float colball;
28 short loc_flag; /* reserved by locale module specific states */
29 // char octantflag;
30 float mass;
33
37extern struct SoftBody *sbNew(void);
38
42extern void sbFree(struct Object *ob);
43
47extern void sbFreeSimulation(struct SoftBody *sb);
48
52extern void sbObjectStep(struct Depsgraph *depsgraph,
53 struct Scene *scene,
54 struct Object *ob,
55 float cfra,
56 float (*vertexCos)[3],
57 int numVerts);
58
62extern void sbObjectToSoftbody(struct Object *ob);
63
68extern void sbSetInterruptCallBack(int (*f)(void));
69
83extern void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
84
85#ifdef __cplusplus
86}
87#endif
void sbObjectStep(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float cfra, float(*vertexCos)[3], int numVerts)
Definition softbody.cc:3513
void sbObjectToSoftbody(struct Object *ob)
Definition softbody.cc:3198
struct BodyPoint BodyPoint
struct SoftBody * sbNew(void)
Definition softbody.cc:3117
void sbFreeSimulation(struct SoftBody *sb)
Definition softbody.cc:3193
void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3])
Definition softbody.cc:3247
void sbSetInterruptCallBack(int(*f)(void))
Definition softbody.cc:3217
void sbFree(struct Object *ob)
Definition softbody.cc:3168
const Depsgraph * depsgraph
float pos[3]
float force[3]
float origE[3]
float vec[3]
float prevdv[3]
float choke2
float prevdx[3]
float prevvec[3]
float choke
float colball
float impdv[3]
short loc_flag
float prevpos[3]
int * springs
float origT[3]
float origS[3]
float frozen
float impdx[3]
float springweight