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:
authorSergej Reich <sergej.reich@googlemail.com>2013-12-26 20:02:28 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-12-26 21:38:05 +0400
commit2260a7dbc0b6150489832dd94160512d1760fb00 (patch)
tree9427bbe06c1cb5cfeae643883408e46021742a9a /source/blender/makesdna/DNA_rigidbody_types.h
parent55397c690decac67f941f565af2155116b0e6a99 (diff)
Rigidbody: Add option to choose mesh source for collision shapes
The options are: Base: Base mesh Deform: shape keys and deform modifiers Final: All deformations and modifiers It would be nice to have a way of specifying where exactly in the modifier stack the collision shape is generated. However this is not staight forward since the rigid body simulation is not part of the modifier system and would require hacks to make it work.
Diffstat (limited to 'source/blender/makesdna/DNA_rigidbody_types.h')
-rw-r--r--source/blender/makesdna/DNA_rigidbody_types.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h
index 4a96c324f04..de23a3c2370 100644
--- a/source/blender/makesdna/DNA_rigidbody_types.h
+++ b/source/blender/makesdna/DNA_rigidbody_types.h
@@ -103,7 +103,8 @@ typedef struct RigidBodyOb {
int flag; /* (eRigidBodyOb_Flag) */
int col_groups; /* Collision groups that determines wich rigid bodies can collide with each other */
- int pad;
+ short mesh_source; /* (eRigidBody_MeshSource) mesh source for mesh based collision shapes */
+ short pad;
/* Physics Parameters */
float mass; /* how much object 'weighs' (i.e. absolute 'amount of stuff' it holds) */
@@ -173,6 +174,15 @@ typedef enum eRigidBody_Shape {
//RB_SHAPE_COMPOUND,
} eRigidBody_Shape;
+typedef enum eRigidBody_MeshSource {
+ /* base mesh */
+ RBO_MESH_BASE = 0,
+ /* only deformations */
+ RBO_MESH_DEFORM,
+ /* final derived mesh */
+ RBO_MESH_FINAL
+} eRigidBody_MeshSource;
+
/* ******************************** */
/* RigidBody Constraint */