Blender V5.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
9
10namespace blender {
11
12struct Depsgraph;
13struct Object;
14struct Scene;
15struct SoftBody;
16
17struct BodyPoint {
18 float origS[3], origE[3], origT[3], pos[3], vec[3], force[3];
19 float goal;
20 float prevpos[3], prevvec[3], prevdx[3], prevdv[3]; /* used for Heun integration */
21 float impdv[3], impdx[3];
23 int *springs;
25 float colball;
26 short loc_flag; /* reserved by locale module specific states */
27 // char octantflag;
28 float mass;
30};
31
35extern struct SoftBody *sbNew();
36
40extern void sbFree(struct Object *ob);
41
42/*
43 * Copy soft-body data.
44 */
45extern SoftBody *sbCopy(struct SoftBody *sb, int flag);
46
50extern void sbFreeSimulation(struct SoftBody *sb);
51
55extern void sbObjectStep(struct Depsgraph *depsgraph,
56 struct Scene *scene,
57 struct Object *ob,
58 float cfra,
59 float (*vertexCos)[3],
60 int numVerts);
61
65extern void sbObjectToSoftbody(struct Object *ob);
66
71extern void sbSetInterruptCallBack(int (*f)());
72
86extern void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
87
88} // namespace blender
BMesh Iterators.
void sbFreeSimulation(struct SoftBody *sb)
Definition softbody.cc:3194
void sbObjectStep(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float cfra, float(*vertexCos)[3], int numVerts)
Definition softbody.cc:3514
struct SoftBody * sbNew()
Definition softbody.cc:3068
SoftBody * sbCopy(struct SoftBody *sb, int flag)
Definition softbody.cc:3145
void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3])
Definition softbody.cc:3248
void sbSetInterruptCallBack(int(*f)())
Definition softbody.cc:3218
void sbFree(struct Object *ob)
Definition softbody.cc:3120
void sbObjectToSoftbody(struct Object *ob)
Definition softbody.cc:3199