Based on feedback from another professional game company, there are several improvements, including some API change...

Some dynamic memory allocations have been replace by pool allocation or stack allocations.
quantized aabb versus quantized aabb overlap check is made branch-free (helps a lot on consoles PS3/XBox 360)
Collision algorithms are now created through a new btDefaultCollisionConfiguration, to decouple dependency (this is the API change):
Example:
	btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
	m_dispatcher = new	btCollisionDispatcher(collisionConfiguration);
This commit is contained in:
ejcoumans
2007-09-08 05:40:01 +00:00
parent 30b1887f40
commit 87df3d0f32
67 changed files with 1116 additions and 972 deletions

View File

@@ -95,6 +95,8 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
tcount = wo.loadObj("../../file.obj");
}
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
#ifdef USE_PARALLEL_DISPATCHER
#ifdef USE_WIN32_THREADING
@@ -112,9 +114,9 @@ void ConvexDecompositionDemo::initPhysics(const char* filename)
///you can hook it up to your custom task scheduler by deriving from btThreadSupportInterface
#endif
btCollisionDispatcher* dispatcher = new SpuGatheringCollisionDispatcher(threadSupport,maxNumOutstandingTasks);
btCollisionDispatcher* dispatcher = new SpuGatheringCollisionDispatcher(threadSupport,maxNumOutstandingTasks,collisionConfiguration);
#else
btCollisionDispatcher* dispatcher = new btCollisionDispatcher();
btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
#endif//USE_PARALLEL_DISPATCHER