From 2abd79b491c024eee8ad460815486fc051aefbf4 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 15 Aug 2005 10:30:53 +0000 Subject: - readded DL_VERTS type to store lattice deformed verts - new feature, twiddled with lattice resizing to try to maintain existing vertex changes... much nicer than just resetting the lattice if you decide you need more detail in the lattice. - modifiers work with lattices now. yes, that does mean you can make a chain of lattices effecting each other 8 miles long. - some cleanup of softbody code, was rather splintered and call path was twisted and confusing. reworked main object step routine to do things in a more obvious and consistent manner and without duplicate code - added ob->softflag OB_SB_RESET instead of sbObjectReset call - modifier changes reset softbody now - moved curve_getVertexCos/curve_applyVertexCos into curve.c - update curve modifier eval to work with virtual modifiers - update modifier apply to work with curves/surfs - update make parent to also recalc object data NOTE: Although you can turn SB on for curve/font objects at the moment it doesn't really work because they call deform in multiple steps and this confuses SB. Not sure how to deal with atm. --- source/blender/blenkernel/BKE_softbody.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'source/blender/blenkernel/BKE_softbody.h') diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index f47cb1b51e3..3ead7445c03 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -34,19 +34,6 @@ #ifndef BKE_SOFTBODY_H #define BKE_SOFTBODY_H -typedef struct BodyPoint { - float origS[3], origE[3], origT[3], pos[3], vec[3], force[3]; - float weight, goal; - float prevpos[3], prevvec[3], prevdx[3], prevdv[3]; /* used for Heun integration */ - int nofsprings; int *springs; - float contactfrict; -} BodyPoint; - -typedef struct BodySpring { - int v1, v2; - float len, strength; -} BodySpring; - struct Object; struct SoftBody; @@ -56,16 +43,11 @@ extern struct SoftBody *sbNew(void); /* frees internal data and softbody itself */ extern void sbFree(struct SoftBody *sb); -/* go one step in simulation, copy result in vertexCos for meshes, or - * directly for lattices. - */ -extern void sbObjectStep(struct Object *ob, float framnr, float (*vertexCos)[3]); +/* do one simul step, reading and writing vertex locs from given array */ +extern void sbObjectStep(struct Object *ob, float framnr, float (*vertexCos)[3], int numVerts); /* makes totally fresh start situation, resets time */ -extern void sbObjectToSoftbody(struct Object *ob, float (*vertexCos)[3]); - -/* resets all motion and time */ -extern void sbObjectReset(struct Object *ob, float (*vertexCos)[3]); +extern void sbObjectToSoftbody(struct Object *ob); #endif -- cgit v1.2.3