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/btSoftBodyHelpers.cpp')
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp
index 6ab93c16402..61aac5b4ce5 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp
@@ -793,7 +793,7 @@ btSoftBody* btSoftBodyHelpers::CreateEllipsoid(btSoftBodyWorldInfo& worldInfo,c
//
btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo& worldInfo,const btScalar* vertices,
const int* triangles,
- int ntriangles)
+ int ntriangles, bool randomizeConstraints)
{
int maxidx=0;
int i,j,ni;
@@ -828,13 +828,16 @@ btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo& worldInfo
#undef IDX
psb->appendFace(idx[0],idx[1],idx[2]);
}
- psb->randomizeConstraints();
+ if (randomizeConstraints)
+ {
+ psb->randomizeConstraints();
+ }
return(psb);
}
//
btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldInfo, const btVector3* vertices,
- int nvertices)
+ int nvertices, bool randomizeConstraints)
{
HullDesc hdsc(QF_TRIANGLES,nvertices,vertices);
HullResult hres;
@@ -854,6 +857,9 @@ btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldI
psb->appendFace(idx[0],idx[1],idx[2]);
}
hlib.ReleaseResult(hres);
- psb->randomizeConstraints();
+ if (randomizeConstraints)
+ {
+ psb->randomizeConstraints();
+ }
return(psb);
}