diff options
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) { |