working version on Mac OSX (no compound, but concave/convex)

This commit is contained in:
Erwin Coumans 2013-03-21 17:54:14 -07:00
parent 12700a7cd4
commit e698b1e22b
5 changed files with 9 additions and 6 deletions

View File

@ -37,9 +37,9 @@ public:
:useOpenCL(true),
preferredOpenCLPlatformIndex(-1),
preferredOpenCLDeviceIndex(-1),
arraySizeX(30),
arraySizeX(10),
arraySizeY(10 ),
arraySizeZ(30),
arraySizeZ(10),
m_useConcaveMesh(false),
gapX(6.3),
gapY(12.0),

View File

@ -64,6 +64,7 @@ btAlignedObjectArray<const char*> demoNames;
int selectedDemo = 0;
GpuDemo::CreateFunc* allDemos[]=
{
GpuConvexScene::MyCreateFunc,
GpuCompoundScene::MyCreateFunc,
ConcaveScene::MyCreateFunc,
GpuConvexScene::MyCreateFunc,

View File

@ -193,7 +193,9 @@ void ConcaveScene::setupScene(const ConstructionInfo& ci)
btAlignedObjectArray<btVector3> verts;
for (int i=0;i<shape->m_numvertices;i++)
{
btVector3 vtx = (btVector3&)shape->m_vertices->at(i).xyzw;
btVector3 vtx(shape->m_vertices->at(i).xyzw[0],
shape->m_vertices->at(i).xyzw[1],
shape->m_vertices->at(i).xyzw[2]);
verts.push_back(vtx*scaling);
}

View File

@ -18,7 +18,7 @@ struct btConfig
int m_maxTriConvexPairCapacity;
btConfig()
:m_maxConvexBodies(32*1024),
:m_maxConvexBodies(16*1024),
m_maxConvexShapes(8192),
m_maxVerticesPerFace(64),
m_maxFacesPerShape(64),
@ -26,7 +26,7 @@ struct btConfig
m_maxConvexIndices(8192),
m_maxConvexUniqueEdges(8192),
m_maxCompoundChildShapes(8192),
m_maxTriConvexPairCapacity(32*1024)
m_maxTriConvexPairCapacity(16*1024)
{
m_maxBroadphasePairs = 16*m_maxConvexBodies;
}

View File

@ -229,4 +229,4 @@ int btGpuRigidBodyPipeline::registerPhysicsInstance(float mass, const float* po
*/
return bodyIndex;
}
}