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:
Diffstat (limited to 'extern/bullet2/src/BulletSoftBody/btSoftBody.cpp')
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBody.cpp14
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)
{