Refactoring for parallel processing of islands, collision detection and constraint solving.
This commit is contained in:
@@ -27,6 +27,9 @@ subject to the following restrictions:
|
||||
|
||||
#include "Dynamics/RigidBody.h"
|
||||
#include "CollisionDispatch/CollisionDispatcher.h"
|
||||
|
||||
#include "ParallelIslandDispatcher.h"
|
||||
|
||||
#include "BroadphaseCollision/SimpleBroadphase.h"
|
||||
#include "BroadphaseCollision/AxisSweep3.h"
|
||||
#include "ConstraintSolver/Point2PointConstraint.h"
|
||||
@@ -128,13 +131,13 @@ int main(int argc,char** argv)
|
||||
|
||||
|
||||
CollisionDispatcher* dispatcher = new CollisionDispatcher();
|
||||
|
||||
|
||||
Dispatcher* dispatcher2 = new ParallelIslandDispatcher();
|
||||
|
||||
SimdVector3 worldAabbMin(-30000,-30000,-30000);
|
||||
SimdVector3 worldAabbMax(30000,30000,30000);
|
||||
|
||||
//BroadphaseInterface* broadphase = new AxisSweep3(worldAabbMin,worldAabbMax,maxProxies,maxOverlap);
|
||||
BroadphaseInterface* broadphase = new SimpleBroadphase(maxProxies,maxOverlap);
|
||||
OverlappingPairCache* broadphase = new SimpleBroadphase(maxProxies,maxOverlap);
|
||||
|
||||
physicsEnvironmentPtr = new CcdPhysicsEnvironment(dispatcher,broadphase);
|
||||
physicsEnvironmentPtr->setDeactivationTime(2.f);
|
||||
|
||||
@@ -844,7 +844,7 @@ int main(int argc,char** argv)
|
||||
CollisionDispatcher* dispatcher = new CollisionDispatcher();
|
||||
SimdVector3 worldAabbMin(-10000,-10000,-10000);
|
||||
SimdVector3 worldAabbMax(10000,10000,10000);
|
||||
BroadphaseInterface* broadphase = new AxisSweep3(worldAabbMin,worldAabbMax);
|
||||
OverlappingPairCache* broadphase = new AxisSweep3(worldAabbMin,worldAabbMax);
|
||||
//BroadphaseInterface* broadphase = new SimpleBroadphase();
|
||||
physicsEnvironmentPtr = new CcdPhysicsEnvironment(dispatcher,broadphase);
|
||||
physicsEnvironmentPtr->setDeactivationTime(2.f);
|
||||
|
||||
@@ -221,7 +221,7 @@ int main(int argc,char** argv)
|
||||
|
||||
CollisionDispatcher* dispatcher = new CollisionDispatcher();
|
||||
|
||||
BroadphaseInterface* broadphase = new SimpleBroadphase();
|
||||
OverlappingPairCache* broadphase = new SimpleBroadphase();
|
||||
|
||||
|
||||
physicsEnvironmentPtr = new CcdPhysicsEnvironment(dispatcher,broadphase);
|
||||
|
||||
@@ -77,7 +77,7 @@ int main(int argc,char** argv)
|
||||
|
||||
CollisionDispatcher* dispatcher = new CollisionDispatcher();
|
||||
|
||||
BroadphaseInterface* broadphase = new SimpleBroadphase();
|
||||
OverlappingPairCache* broadphase = new SimpleBroadphase();
|
||||
|
||||
|
||||
physicsEnvironmentPtr = new CcdPhysicsEnvironment(dispatcher,broadphase);
|
||||
|
||||
@@ -337,8 +337,8 @@ int main(int argc,char** argv)
|
||||
SimdVector3 worldAabbMin(-10000,-10000,-10000);
|
||||
SimdVector3 worldAabbMax(10000,10000,10000);
|
||||
|
||||
BroadphaseInterface* broadphase = new AxisSweep3(worldAabbMin,worldAabbMax);
|
||||
//BroadphaseInterface* broadphase = new SimpleBroadphase();
|
||||
OverlappingPairCache* broadphase = new AxisSweep3(worldAabbMin,worldAabbMax);
|
||||
//OverlappingPairCache* broadphase = new SimpleBroadphase();
|
||||
|
||||
physicsEnvironmentPtr = new CcdPhysicsEnvironment(dispatcher,broadphase);
|
||||
physicsEnvironmentPtr->setDeactivationTime(2.f);
|
||||
|
||||
Reference in New Issue
Block a user