experiment with first-level batching using object index instead of spatial hash in uniform grid (to avoid tuning average object size for uniform grid)

This commit is contained in:
erwin coumans
2013-05-03 01:14:34 -07:00
parent 6ee9eb9bb5
commit 1185de51d5
7 changed files with 211 additions and 15 deletions

View File

@@ -15,9 +15,9 @@ subject to the following restrictions:
///create 125 (5x5x5) dynamic object
#define ARRAY_SIZE_X 5
#define ARRAY_SIZE_Y 5
#define ARRAY_SIZE_Z 5
#define ARRAY_SIZE_X 30
#define ARRAY_SIZE_Y 20
#define ARRAY_SIZE_Z 30
//maximum number of objects (and allow user to shoot additional boxes)
#define MAX_PROXIES (ARRAY_SIZE_X*ARRAY_SIZE_Y*ARRAY_SIZE_Z + 1024)
@@ -164,7 +164,7 @@ void BasicGpuDemo::exitCL()
BasicGpuDemo::BasicGpuDemo()
{
m_clData = new btInternalData;
setCameraDistance(btScalar(SCALING*20.));
setCameraDistance(btScalar(SCALING*120.));
this->setAzi(45);
this->setEle(45);
@@ -222,7 +222,7 @@ void BasicGpuDemo::initPhysics()
m_dynamicsWorld->setGravity(btVector3(0,-10,0));
///create a few basic rigid bodies
btBoxShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));
btBoxShape* groundShape = new btBoxShape(btVector3(btScalar(150.),btScalar(50.),btScalar(150.)));
//groundShape->initializePolyhedralFeatures();
// btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0,1,0),50);