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/makesdna/DNA_object_force.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/makesdna/DNA_object_force.h')
-rw-r--r--source/blender/makesdna/DNA_object_force.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 1376a08eb3e..adccf8893d4 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -301,6 +301,11 @@ typedef struct SoftBody {
struct ListBase ptcaches;
struct EffectorWeights *effector_weights;
+ /* reverse esimated obmatrix .. no need to store in blend file .. how ever who cares */
+ float lcom[3];
+ float lrot[3][3];
+ float lscale[3][3];
+ char pad4[4];
} SoftBody;
@@ -379,8 +384,9 @@ typedef struct SoftBody {
#define OB_SB_AERO_ANGLE 16384
/* sb->solverflags */
-#define SBSO_MONITOR 1
-#define SBSO_OLDERR 2
+#define SBSO_MONITOR 1
+#define SBSO_OLDERR 2
+#define SBSO_ESTIMATEIPO 4
/* sb->sbc_mode */
#define SBC_MODE_MANUAL 0