diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2008-09-27 01:27:33 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2008-09-27 01:27:33 +0400 |
commit | 73119b840af9b6c7a3e27f451e4527f7797e27b2 (patch) | |
tree | a55970eb3bf2d088ac1e5eafcfd805ec093aea33 /extern | |
parent | 6cc87a10475922d8bc26c79917294a1c2dbfabf6 (diff) |
avoid adding degenerate faces to a Bullet soft body
Diffstat (limited to 'extern')
-rw-r--r-- | extern/bullet2/src/BulletSoftBody/btSoftBody.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp index 7b7b2da910a..fb20cb68f8f 100644 --- a/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp +++ b/extern/bullet2/src/BulletSoftBody/btSoftBody.cpp @@ -284,6 +284,13 @@ m_faces.push_back(f); // void btSoftBody::appendFace(int node0,int node1,int node2,Material* mat) { + if (node0==node1) + return; + if (node1==node2) + return; + if (node2==node0) + return; + appendFace(-1,mat); Face& f=m_faces[m_faces.size()-1]; btAssert(node0!=node1); |