diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-01-23 09:57:01 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-01-23 09:57:01 +0400 |
commit | c48238fac6c3a8a767c290ebb1c5e22b18d9bfe9 (patch) | |
tree | a8a37bf18886d397737b8f9be0520f43c1a1f5f6 /source/blender/makesdna/DNA_rigidbody_types.h | |
parent | 47c96081d00f2edfb1148d5d7c276489f03a8581 (diff) |
rigidbody: Add generic spring constraint
Behaves like the generic constraint but has optional spring on each axis.
TODO: Add option to set rest length.
Patch by Markus Kasten (markus111), thanks!
Diffstat (limited to 'source/blender/makesdna/DNA_rigidbody_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_rigidbody_types.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h index 5b7ffe4209c..e24b24deece 100644 --- a/source/blender/makesdna/DNA_rigidbody_types.h +++ b/source/blender/makesdna/DNA_rigidbody_types.h @@ -207,6 +207,15 @@ typedef struct RigidBodyCon { float limit_ang_z_lower; /* lower limit for z axis rotation */ float limit_ang_z_upper; /* upper limit for z axis rotation */ + /* spring settings */ + /* RB_TODO document spring properties */ + float spring_stiffness_x; + float spring_stiffness_y; + float spring_stiffness_z; + float spring_damping_x; + float spring_damping_y; + float spring_damping_z; + /* References to Physics Sim object. Exist at runtime only */ void *physics_constraint; /* Physics object representation (i.e. btTypedConstraint) */ } RigidBodyCon; @@ -257,6 +266,10 @@ typedef enum eRigidBodyCon_Flag { RBC_FLAG_USE_LIMIT_ANG_X = (1<<8), RBC_FLAG_USE_LIMIT_ANG_Y = (1<<9), RBC_FLAG_USE_LIMIT_ANG_Z = (1<<10), + /* springs */ + RBC_FLAG_USE_SPRING_X = (1<<11), + RBC_FLAG_USE_SPRING_Y = (1<<12), + RBC_FLAG_USE_SPRING_Z = (1<<13) } eRigidBodyCon_Flag; /* ******************************** */ |