Please add extern/bullet2/src/LinearMath/btConvexHull.cpp to your build system!

Reverted back to original Bullet version.
This commit is contained in:
Erwin Coumans 2008-09-17 19:47:26 +00:00
parent 0a6d2e26a9
commit 015a42079c

@ -278,7 +278,7 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
HullResult hres; HullResult hres;
HullLibrary hlib; HullLibrary hlib;
hdsc.mMaxVertices=vertices.size(); hdsc.mMaxVertices=vertices.size();
//hlib.CreateConvexHull(hdsc,hres); hlib.CreateConvexHull(hdsc,hres);
const btVector3 center=average(hres.m_OutputVertices); const btVector3 center=average(hres.m_OutputVertices);
add(hres.m_OutputVertices,-center); add(hres.m_OutputVertices,-center);
mul(hres.m_OutputVertices,(btScalar)1); mul(hres.m_OutputVertices,(btScalar)1);
@ -291,7 +291,7 @@ void btSoftBodyHelpers::Draw( btSoftBody* psb,
hres.m_OutputVertices[idx[2]], hres.m_OutputVertices[idx[2]],
color,1); color,1);
} }
//hlib.ReleaseResult(hres); hlib.ReleaseResult(hres);
} }
/* Velocities */ /* Velocities */
#if 0 #if 0
@ -634,7 +634,7 @@ btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldI
HullResult hres; HullResult hres;
HullLibrary hlib;/*??*/ HullLibrary hlib;/*??*/
hdsc.mMaxVertices=nvertices; hdsc.mMaxVertices=nvertices;
//hlib.CreateConvexHull(hdsc,hres); hlib.CreateConvexHull(hdsc,hres);
btSoftBody* psb=new btSoftBody(&worldInfo,(int)hres.mNumOutputVertices, btSoftBody* psb=new btSoftBody(&worldInfo,(int)hres.mNumOutputVertices,
&hres.m_OutputVertices[0],0); &hres.m_OutputVertices[0],0);
for(int i=0;i<(int)hres.mNumFaces;++i) for(int i=0;i<(int)hres.mNumFaces;++i)
@ -647,7 +647,7 @@ btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldI
if(idx[2]<idx[0]) psb->appendLink( idx[2],idx[0]); if(idx[2]<idx[0]) psb->appendLink( idx[2],idx[0]);
psb->appendFace(idx[0],idx[1],idx[2]); psb->appendFace(idx[0],idx[1],idx[2]);
} }
//hlib.ReleaseResult(hres); hlib.ReleaseResult(hres);
psb->randomizeConstraints(); psb->randomizeConstraints();
return(psb); return(psb);
} }