diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2008-09-26 06:27:59 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2008-09-26 06:27:59 +0400 |
commit | a1bef84ea859cf85487d4cac8664402dd86f4465 (patch) | |
tree | aab43249487d338e39e9df721a5675536ffb65ff /extern/bullet2/src/BulletSoftBody/btSoftBody.cpp | |
parent | 6732718ef1b7f212e2368cf237c08d72f13d06ab (diff) |
Allow Bullet soft bodies to be created using a AddObject actuator. Added a fake world coordinate system to game soft bodies, although the vertices are already in world space.
Added Bullet/Gimpact concave collision detection to Blender. If your build system isn't updated yet, please add extern/bullet2/src/BulletCollision/Gimpact/*
This allows moving/dynamic concave triangle meshes (decomposing meshes into compound convex shapes, and using 'compound' shapes is still preferred)
Diffstat (limited to 'extern/bullet2/src/BulletSoftBody/btSoftBody.cpp')
-rw-r--r-- | extern/bullet2/src/BulletSoftBody/btSoftBody.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp index e42a613343b..7b7b2da910a 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp @@ -384,6 +384,20 @@ void btSoftBody::addVelocity(const btVector3& velocity) for(int i=0,ni=m_nodes.size();i<ni;++i) addVelocity(velocity,i); } +/* Set velocity for the entire body */ +void btSoftBody::setVelocity( const btVector3& velocity) +{ + for(int i=0,ni=m_nodes.size();i<ni;++i) + { + Node& n=m_nodes[i]; + if(n.m_im>0) + { + n.m_v = velocity; + } + } +} + + // void btSoftBody::addVelocity(const btVector3& velocity,int node) { |