diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2008-10-01 03:34:25 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2008-10-01 03:34:25 +0400 |
commit | 808d6197cfa372c15067aa14a91791ba9b167915 (patch) | |
tree | 972dcafe2f60a767cc6b266310f6551681c1eea1 /extern/bullet2 | |
parent | 09f79a8e9f26d931667884f1147484e5d93ad63b (diff) |
add support for Bullet soft body constraints against a Bullet rigid body, as well as 'fixing' it. Just use the existing rigid body joint to use it. For now, it searches the closest node/vertex to the pivot. So you can use multiple constraints/joint to attach a cloth, soft body etc.
Diffstat (limited to 'extern/bullet2')
-rw-r--r-- | extern/bullet2/src/BulletSoftBody/btSoftBody.cpp | 3 | ||||
-rw-r--r-- | extern/bullet2/src/BulletSoftBody/btSoftBody.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp index fb20cb68f8f..0a27dbcedb5 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp @@ -87,7 +87,7 @@ btSoftBody::btSoftBody(btSoftBodyWorldInfo* worldInfo,int node_count, const btV } updateBounds(); - + m_initialWorldTransform.setIdentity(); } // @@ -497,6 +497,7 @@ void btSoftBody::transform(const btTransform& trs) updateNormals(); updateBounds(); updateConstants(); + m_initialWorldTransform = trs; } // diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.h b/extern/bullet2/src/BulletSoftBody/btSoftBody.h index b6d7c17b754..79d272765e0 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBody.h +++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.h @@ -594,7 +594,8 @@ public: btDbvt m_fdbvt; // Faces tree btDbvt m_cdbvt; // Clusters tree tClusterArray m_clusters; // Clusters - + + btTransform m_initialWorldTransform; //used to attach constraints etc. // // Api // |