Revision: 25527 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25527 Author: ben2610 Date: 2009-12-22 20:52:14 +0100 (Tue, 22 Dec 2009)
Log Message: ----------- Bullet: synchronize soft body helpers with current SVN. Modified Paths: -------------- trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h Modified: trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp =================================================================== --- trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp 2009-12-22 19:50:20 UTC (rev 25526) +++ trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.cpp 2009-12-22 19:52:14 UTC (rev 25527) @@ -793,7 +793,7 @@ // 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,14 +828,16 @@ #undef IDX psb->appendFace(idx[0],idx[1],idx[2]); } - // don't randomize now, let's give a chance to the application to set face data - //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; @@ -855,6 +857,9 @@ psb->appendFace(idx[0],idx[1],idx[2]); } hlib.ReleaseResult(hres); - psb->randomizeConstraints(); + if (randomizeConstraints) + { + psb->randomizeConstraints(); + } return(psb); } Modified: trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h =================================================================== --- trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h 2009-12-22 19:50:20 UTC (rev 25526) +++ trunk/blender/extern/bullet2/src/BulletSoftBody/btSoftBodyHelpers.h 2009-12-22 19:52:14 UTC (rev 25527) @@ -109,11 +109,13 @@ static btSoftBody* CreateFromTriMesh( btSoftBodyWorldInfo& worldInfo, const btScalar* vertices, const int* triangles, - int ntriangles); + int ntriangles, + bool randomizeConstraints = true); /* Create from convex-hull */ static btSoftBody* CreateFromConvexHull( btSoftBodyWorldInfo& worldInfo, const btVector3* vertices, - int nvertices); + int nvertices, + bool randomizeConstraints = true); }; #endif //SOFT_BODY_HELPERS_H _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs