expose gravity to host

prettify convex demo
This commit is contained in:
erwin coumans
2013-03-22 14:14:54 -07:00
parent 9997e45dcb
commit 47344ec500
10 changed files with 65 additions and 105 deletions

View File

@@ -18,7 +18,7 @@ struct btConfig
int m_maxTriConvexPairCapacity;
btConfig()
:m_maxConvexBodies(16*1024),
:m_maxConvexBodies(32*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(16*1024)
m_maxTriConvexPairCapacity(64*1024)
{
m_maxBroadphasePairs = 16*m_maxConvexBodies;
}

View File

@@ -35,7 +35,7 @@ enum
};
bool gpuBatchContacts = false;
bool gpuBatchContacts = true;
bool gpuSolveConstraint = true;

View File

@@ -143,10 +143,13 @@ void btGpuRigidBodyPipeline::integrate(float timeStep)
launcher.setBuffer(m_data->m_narrowphase->getBodiesGpu());
int numBodies = m_data->m_narrowphase->getNumBodiesGpu();
launcher.setConst(numBodies);
launcher.setConst(timeStep);
float angularDamp = 0.99f;
launcher.setConst(angularDamp);
btVector3 gravity(0.f,-9.8f,0.f);
launcher.setConst(gravity);
launcher.launch1D(numBodies);
}