Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Ole Wund <bjornmose@gmx.net>2009-11-22 01:45:25 +0300
committerJens Ole Wund <bjornmose@gmx.net>2009-11-22 01:45:25 +0300
commit70e38422d25a5aab233c5c5e8b59077b0ccffa6e (patch)
tree3a6dbb1112f950e2344f78bf7a81c7a4b4bf2342 /source/blender/blenkernel/BKE_softbody.h
parent5e7debcecf9abfd3ac441d5e5fd8cfca69c5dc34 (diff)
new property for soft bodies
sb->lcom : Center Of Mass .. might be used to create loc IPO sb_>lrot : is a matrix[3] esitmates the roatation in world coordinates .. might be used to create rot IPO sb_>lscale : is a matrix[3] esitmates the scaling in world coordinates .. might be used to create scale IPO (no python for that yet .. but may be matt has mercy on me ) can be cropped direclty in soft body module by function static void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3]) The targets lloc,lrot,lscale should work to be NULL, just in case you don't need it. However i'd prefer if they were accessed via properties which should be calculated automagically if sb->solverflags & SBSO_ESTIMATEIPO is set, like they do in draw_sb_motion(..) in drawobject.c added static void draw_sb_motion(Scene *scene, Object *ob) to drawobject.c for debuggering (had a hard time with destructive matrix operations ) if it causes any trouble with your build on any OS make sure to comment that away. softbody.c and DNA should compile fine in any case.
Diffstat (limited to 'source/blender/blenkernel/BKE_softbody.h')
-rw-r--r--source/blender/blenkernel/BKE_softbody.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h
index d8053281ceb..92cb5542ad1 100644
--- a/source/blender/blenkernel/BKE_softbody.h
+++ b/source/blender/blenkernel/BKE_softbody.h
@@ -68,5 +68,8 @@ extern void sbObjectToSoftbody(struct Object *ob);
/* pass NULL to unlink again */
extern void sbSetInterruptCallBack(int (*f)(void));
+extern void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3]);
+
+
#endif