fairly large refactoring of dispatcher/simulation island management, to allow for parallel simulation.

This commit is contained in:
ejcoumans
2006-07-01 00:22:15 +00:00
parent 8e91b0cd68
commit 2d80bae6e3
16 changed files with 424 additions and 283 deletions

View File

@@ -13,6 +13,9 @@ subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution.
*/
//#define USE_PARALLEL_DISPATCHER 1
#include "CcdPhysicsEnvironment.h"
#include "ParallelPhysicsEnvironment.h"
@@ -89,6 +92,7 @@ const int maxNumObjects = 32760;
MyMotionState ms[maxNumObjects];
CcdPhysicsController* physObjects[maxNumObjects] = {0,0,0,0};
int shapeIndex[maxNumObjects];
#ifdef USE_PARALLEL_DISPATCHER
ParallelPhysicsEnvironment* physicsEnvironmentPtr = 0;
#else
@@ -308,6 +312,8 @@ int main(int argc,char** argv)
clientResetScene();
physicsEnvironmentPtr->SyncMotionStates(0.f);
{
//physObjects[i]->SetAngularVelocity(0,0,-2,true);