From 3a85557c294bdf8588eb878c573f6acac8c140d7 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Fri, 30 Jun 2006 00:41:09 +0000 Subject: [PATCH] Refactoring for parallel processing of islands, collision detection and constraint solving. --- .../BroadphaseCollision/BroadphaseInterface.h | 2 +- .../OverlappingPairCache.cpp | 63 --- .../OverlappingPairCache.h | 2 +- .../CollisionDispatch/CollisionCreateFunc.h | 42 ++ .../CollisionDispatch/CollisionDispatcher.cpp | 67 +++ .../CollisionDispatch/CollisionDispatcher.h | 23 +- Bullet/CollisionDispatch/CollisionWorld.cpp | 7 +- Bullet/CollisionDispatch/CollisionWorld.h | 16 +- Bullet/CollisionDispatch/ManifoldResult.h | 4 + Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp | 9 +- Demos/ColladaDemo/ColladaDemo.cpp | 2 +- Demos/ConcaveDemo/ConcavePhysicsDemo.cpp | 2 +- Demos/ConstraintDemo/ConstraintDemo.cpp | 2 +- .../ConvexDecompositionDemo.cpp | 4 +- .../CcdPhysics/CcdPhysicsEnvironment.cpp | 19 +- .../CcdPhysics/CcdPhysicsEnvironment.h | 3 +- .../CcdPhysics/ParallelIslandDispatcher.cpp | 295 +++++++++++++ .../CcdPhysics/ParallelIslandDispatcher.h | 126 ++++++ .../CcdPhysics/ParallelPhysicsEnvironment.cpp | 406 ++++++++++++++++++ .../CcdPhysics/ParallelPhysicsEnvironment.h | 42 ++ msvc/8/libbulletccdphysics.vcproj | 262 ++++++----- msvc/8/libbulletdynamics.vcproj | 306 +++++++------ 22 files changed, 1359 insertions(+), 345 deletions(-) create mode 100644 Bullet/CollisionDispatch/CollisionCreateFunc.h create mode 100644 Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.cpp create mode 100644 Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.h create mode 100644 Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.cpp create mode 100644 Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.h diff --git a/Bullet/BroadphaseCollision/BroadphaseInterface.h b/Bullet/BroadphaseCollision/BroadphaseInterface.h index 88bf896a9..3ca273bde 100644 --- a/Bullet/BroadphaseCollision/BroadphaseInterface.h +++ b/Bullet/BroadphaseCollision/BroadphaseInterface.h @@ -33,7 +33,7 @@ public: virtual void DestroyProxy(BroadphaseProxy* proxy)=0; virtual void SetAabb(BroadphaseProxy* proxy,const SimdVector3& aabbMin,const SimdVector3& aabbMax)=0; virtual void CleanProxyFromPairs(BroadphaseProxy* proxy)=0; - virtual void DispatchAllCollisionPairs(Dispatcher& dispatcher,DispatcherInfo& dispatchInfo)=0; + }; diff --git a/Bullet/BroadphaseCollision/OverlappingPairCache.cpp b/Bullet/BroadphaseCollision/OverlappingPairCache.cpp index 9f6c0f590..21540c706 100644 --- a/Bullet/BroadphaseCollision/OverlappingPairCache.cpp +++ b/Bullet/BroadphaseCollision/OverlappingPairCache.cpp @@ -147,67 +147,4 @@ void OverlappingPairCache::RemoveOverlappingPairsContainingProxy(BroadphaseProxy } -void OverlappingPairCache::DispatchAllCollisionPairs(Dispatcher& dispatcher,DispatcherInfo& dispatchInfo) -{ - m_blockedForChanges = true; - int i; - - int dispatcherId = dispatcher.GetUniqueId(); - - RefreshOverlappingPairs(); - - for (i=0;i= 0) - { - //dispatcher will keep algorithms persistent in the collision pair - if (!pair.m_algorithms[dispatcherId]) - { - pair.m_algorithms[dispatcherId] = dispatcher.FindAlgorithm( - *pair.m_pProxy0, - *pair.m_pProxy1); - } - - if (pair.m_algorithms[dispatcherId]) - { - if (dispatchInfo.m_dispatchFunc == DispatcherInfo::DISPATCH_DISCRETE) - { - pair.m_algorithms[dispatcherId]->ProcessCollision(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); - } else - { - float toi = pair.m_algorithms[dispatcherId]->CalculateTimeOfImpact(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); - if (dispatchInfo.m_timeOfImpact > toi) - dispatchInfo.m_timeOfImpact = toi; - - } - } - } else - { - //non-persistent algorithm dispatcher - CollisionAlgorithm* algo = dispatcher.FindAlgorithm( - *pair.m_pProxy0, - *pair.m_pProxy1); - - if (algo) - { - if (dispatchInfo.m_dispatchFunc == DispatcherInfo::DISPATCH_DISCRETE) - { - algo->ProcessCollision(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); - } else - { - float toi = algo->CalculateTimeOfImpact(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); - if (dispatchInfo.m_timeOfImpact > toi) - dispatchInfo.m_timeOfImpact = toi; - } - } - } - - } - - m_blockedForChanges = false; - -} diff --git a/Bullet/BroadphaseCollision/OverlappingPairCache.h b/Bullet/BroadphaseCollision/OverlappingPairCache.h index 8675437e4..d19d579f1 100644 --- a/Bullet/BroadphaseCollision/OverlappingPairCache.h +++ b/Bullet/BroadphaseCollision/OverlappingPairCache.h @@ -74,7 +74,7 @@ class OverlappingPairCache : public BroadphaseInterface return collides; } - void DispatchAllCollisionPairs(Dispatcher& dispatcher,DispatcherInfo& dispatchInfo); + virtual void RefreshOverlappingPairs() =0; diff --git a/Bullet/CollisionDispatch/CollisionCreateFunc.h b/Bullet/CollisionDispatch/CollisionCreateFunc.h new file mode 100644 index 000000000..7c7510fc8 --- /dev/null +++ b/Bullet/CollisionDispatch/CollisionCreateFunc.h @@ -0,0 +1,42 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION_CREATE_FUNC +#define COLLISION_CREATE_FUNC + +#include + +typedef std::vector CollisionObjectArray; +class CollisionAlgorithm; +struct BroadphaseProxy; + + + +struct CollisionAlgorithmCreateFunc +{ + bool m_swapped; + + CollisionAlgorithmCreateFunc() + :m_swapped(false) + { + } + virtual ~CollisionAlgorithmCreateFunc(){}; + + virtual CollisionAlgorithm* CreateCollisionAlgorithm(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1) + { + return 0; + } +}; +#endif //COLLISION_CREATE_FUNC \ No newline at end of file diff --git a/Bullet/CollisionDispatch/CollisionDispatcher.cpp b/Bullet/CollisionDispatch/CollisionDispatcher.cpp index 8bac20f47..6e8c0696c 100644 --- a/Bullet/CollisionDispatch/CollisionDispatcher.cpp +++ b/Bullet/CollisionDispatch/CollisionDispatcher.cpp @@ -24,6 +24,7 @@ subject to the following restrictions: #include "CollisionShapes/CollisionShape.h" #include "CollisionDispatch/CollisionObject.h" #include +#include "BroadphaseCollision/OverlappingPairCache.h" int gNumManifold = 0; @@ -293,3 +294,69 @@ void CollisionDispatcher::ReleaseManifoldResult(ManifoldResult*) { } + + +void CollisionDispatcher::DispatchAllCollisionPairs(OverlappingPairCache* pairCache,DispatcherInfo& dispatchInfo) +{ + //m_blockedForChanges = true; + + int i; + + int dispatcherId = GetUniqueId(); + + pairCache->RefreshOverlappingPairs(); + + for (i=0;iGetNumOverlappingPairs();i++) + { + + BroadphasePair& pair = pairCache->GetOverlappingPair(i); + + if (dispatcherId>= 0) + { + //dispatcher will keep algorithms persistent in the collision pair + if (!pair.m_algorithms[dispatcherId]) + { + pair.m_algorithms[dispatcherId] = FindAlgorithm( + *pair.m_pProxy0, + *pair.m_pProxy1); + } + + if (pair.m_algorithms[dispatcherId]) + { + if (dispatchInfo.m_dispatchFunc == DispatcherInfo::DISPATCH_DISCRETE) + { + pair.m_algorithms[dispatcherId]->ProcessCollision(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); + } else + { + float toi = pair.m_algorithms[dispatcherId]->CalculateTimeOfImpact(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); + if (dispatchInfo.m_timeOfImpact > toi) + dispatchInfo.m_timeOfImpact = toi; + + } + } + } else + { + //non-persistent algorithm dispatcher + CollisionAlgorithm* algo = FindAlgorithm( + *pair.m_pProxy0, + *pair.m_pProxy1); + + if (algo) + { + if (dispatchInfo.m_dispatchFunc == DispatcherInfo::DISPATCH_DISCRETE) + { + algo->ProcessCollision(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); + } else + { + float toi = algo->CalculateTimeOfImpact(pair.m_pProxy0,pair.m_pProxy1,dispatchInfo); + if (dispatchInfo.m_timeOfImpact > toi) + dispatchInfo.m_timeOfImpact = toi; + } + } + } + + } + + //m_blockedForChanges = false; + +} \ No newline at end of file diff --git a/Bullet/CollisionDispatch/CollisionDispatcher.h b/Bullet/CollisionDispatch/CollisionDispatcher.h index d559f77be..c9b70ce8c 100644 --- a/Bullet/CollisionDispatch/CollisionDispatcher.h +++ b/Bullet/CollisionDispatch/CollisionDispatcher.h @@ -22,28 +22,15 @@ subject to the following restrictions: #include "CollisionDispatch/ManifoldResult.h" #include "BroadphaseCollision/BroadphaseProxy.h" -#include + class IDebugDraw; - -typedef std::vector CollisionObjectArray; +class OverlappingPairCache; -struct CollisionAlgorithmCreateFunc -{ - bool m_swapped; - - CollisionAlgorithmCreateFunc() - :m_swapped(false) - { - } - virtual ~CollisionAlgorithmCreateFunc(){}; +#include "CollisionCreateFunc.h" + - virtual CollisionAlgorithm* CreateCollisionAlgorithm(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1) - { - return 0; - } -}; ///CollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs. @@ -131,7 +118,7 @@ public: virtual int GetUniqueId() { return RIGIDBODY_DISPATCHER;} - + virtual void DispatchAllCollisionPairs(OverlappingPairCache* pairCache,DispatcherInfo& dispatchInfo); }; diff --git a/Bullet/CollisionDispatch/CollisionWorld.cpp b/Bullet/CollisionDispatch/CollisionWorld.cpp index 58c243a53..36cdceabf 100644 --- a/Bullet/CollisionDispatch/CollisionWorld.cpp +++ b/Bullet/CollisionDispatch/CollisionWorld.cpp @@ -150,10 +150,13 @@ void CollisionWorld::PerformDiscreteCollisionDetection() for (size_t i=0;im_collisionShape->GetAabb(m_collisionObjects[i]->m_worldTransform,aabbMin,aabbMax); - m_broadphase->SetAabb(m_collisionObjects[i]->m_broadphaseHandle,aabbMin,aabbMax); + m_pairCache->SetAabb(m_collisionObjects[i]->m_broadphaseHandle,aabbMin,aabbMax); } - m_broadphase->DispatchAllCollisionPairs(*GetDispatcher(),dispatchInfo); + CollisionDispatcher* dispatcher = GetDispatcher(); + if (dispatcher) + dispatcher->DispatchAllCollisionPairs(m_pairCache,dispatchInfo); + } diff --git a/Bullet/CollisionDispatch/CollisionWorld.h b/Bullet/CollisionDispatch/CollisionWorld.h index fd34a83a2..8b662e61f 100644 --- a/Bullet/CollisionDispatch/CollisionWorld.h +++ b/Bullet/CollisionDispatch/CollisionWorld.h @@ -70,6 +70,7 @@ class BroadphaseInterface; #include "SimdTransform.h" #include "CollisionObject.h" #include "CollisionDispatcher.h" //for definition of CollisionObjectArray +#include "BroadphaseCollision/OverlappingPairCache.h" #include @@ -85,13 +86,14 @@ class CollisionWorld CollisionDispatcher* m_dispatcher; - BroadphaseInterface* m_broadphase; + OverlappingPairCache* m_pairCache; + public: - CollisionWorld(CollisionDispatcher* dispatcher,BroadphaseInterface* broadphase) + CollisionWorld(CollisionDispatcher* dispatcher,OverlappingPairCache* pairCache) :m_dispatcher(dispatcher), - m_broadphase(broadphase) + m_pairCache(pairCache) { } @@ -102,9 +104,15 @@ public: BroadphaseInterface* GetBroadphase() { - return m_broadphase; + return m_pairCache; } + OverlappingPairCache* GetPairCache() + { + return m_pairCache; + } + + CollisionDispatcher* GetDispatcher() { return m_dispatcher; diff --git a/Bullet/CollisionDispatch/ManifoldResult.h b/Bullet/CollisionDispatch/ManifoldResult.h index da3fa333a..fc23af805 100644 --- a/Bullet/CollisionDispatch/ManifoldResult.h +++ b/Bullet/CollisionDispatch/ManifoldResult.h @@ -21,6 +21,10 @@ subject to the following restrictions: struct CollisionObject; class PersistentManifold; + + + + ///ManifoldResult is a helper class to manage contact results. class ManifoldResult : public DiscreteCollisionDetectorInterface::Result { diff --git a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp index 10556b287..87a83adf7 100644 --- a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp +++ b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp @@ -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); diff --git a/Demos/ColladaDemo/ColladaDemo.cpp b/Demos/ColladaDemo/ColladaDemo.cpp index 2ccddef2f..4ba6bcd96 100644 --- a/Demos/ColladaDemo/ColladaDemo.cpp +++ b/Demos/ColladaDemo/ColladaDemo.cpp @@ -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); diff --git a/Demos/ConcaveDemo/ConcavePhysicsDemo.cpp b/Demos/ConcaveDemo/ConcavePhysicsDemo.cpp index 16309d6f0..67d168767 100644 --- a/Demos/ConcaveDemo/ConcavePhysicsDemo.cpp +++ b/Demos/ConcaveDemo/ConcavePhysicsDemo.cpp @@ -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); diff --git a/Demos/ConstraintDemo/ConstraintDemo.cpp b/Demos/ConstraintDemo/ConstraintDemo.cpp index 44be05bf5..5057d5149 100644 --- a/Demos/ConstraintDemo/ConstraintDemo.cpp +++ b/Demos/ConstraintDemo/ConstraintDemo.cpp @@ -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); diff --git a/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp b/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp index 90dd723c4..04fdc073c 100644 --- a/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp +++ b/Demos/ConvexDecompositionDemo/ConvexDecompositionDemo.cpp @@ -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); diff --git a/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.cpp b/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.cpp index 4304a766b..ff01205d9 100644 --- a/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.cpp +++ b/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.cpp @@ -322,7 +322,7 @@ static void DrawAabb(IDebugDraw* debugDrawer,const SimdVector3& from,const SimdV -CcdPhysicsEnvironment::CcdPhysicsEnvironment(CollisionDispatcher* dispatcher,BroadphaseInterface* broadphase) +CcdPhysicsEnvironment::CcdPhysicsEnvironment(CollisionDispatcher* dispatcher,OverlappingPairCache* pairCache) :m_scalingPropagated(false), m_numIterations(4), m_numTimeSubSteps(1), @@ -336,18 +336,18 @@ m_enableSatCollisionDetection(false) { m_triggerCallbacks[i] = 0; } - if (!dispatcher) - dispatcher = new CollisionDispatcher(); + //if (!dispatcher) + // dispatcher = new CollisionDispatcher(); - if(!broadphase) + if(!pairCache) { //todo: calculate/let user specify this world sizes SimdVector3 worldMin(-10000,-10000,-10000); SimdVector3 worldMax(10000,10000,10000); - broadphase = new AxisSweep3(worldMin,worldMax); + pairCache = new AxisSweep3(worldMin,worldMax); //broadphase = new SimpleBroadphase(); } @@ -355,7 +355,7 @@ m_enableSatCollisionDetection(false) setSolverType(1);//issues with quickstep and memory allocations - m_collisionWorld = new CollisionWorld(dispatcher,broadphase); + m_collisionWorld = new CollisionWorld(dispatcher,pairCache); m_debugDrawer = 0; m_gravity = SimdVector3(0.f,-10.f,0.f); @@ -654,7 +654,7 @@ bool CcdPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep) Profiler::endBlock("predictIntegratedTransform"); #endif //USE_QUICKPROF - BroadphaseInterface* scene = GetBroadphase(); + OverlappingPairCache* scene = m_collisionWorld->GetPairCache(); // @@ -675,7 +675,7 @@ bool CcdPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep) dispatchInfo.m_stepCount = 0; dispatchInfo.m_enableSatConvex = m_enableSatCollisionDetection; - scene->DispatchAllCollisionPairs(*GetDispatcher(),dispatchInfo);///numsubstep,g); + GetDispatcher()->DispatchAllCollisionPairs(scene,dispatchInfo); #ifdef USE_QUICKPROF @@ -842,7 +842,8 @@ bool CcdPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep) dispatchInfo.m_stepCount = 0; dispatchInfo.m_dispatchFunc = DispatcherInfo::DISPATCH_CONTINUOUS; - scene->DispatchAllCollisionPairs( *GetDispatcher(),dispatchInfo);///numsubstep,g); + GetDispatcher()->DispatchAllCollisionPairs(scene,dispatchInfo); + toi = dispatchInfo.m_timeOfImpact; } diff --git a/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.h b/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.h index bbe3d19ad..df11a48a8 100644 --- a/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.h +++ b/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.h @@ -37,6 +37,7 @@ class Dispatcher; class WrapperVehicle; class PersistentManifold; class BroadphaseInterface; +class OverlappingPairCache; class IDebugDraw; /// CcdPhysicsEnvironment is experimental mainloop for physics simulation using optional continuous collision detection. @@ -62,7 +63,7 @@ class CcdPhysicsEnvironment : public PHY_IPhysicsEnvironment public: - CcdPhysicsEnvironment(CollisionDispatcher* dispatcher=0, BroadphaseInterface* broadphase=0); + CcdPhysicsEnvironment(CollisionDispatcher* dispatcher=0, OverlappingPairCache* pairCache=0); virtual ~CcdPhysicsEnvironment(); diff --git a/Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.cpp b/Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.cpp new file mode 100644 index 000000000..21400338f --- /dev/null +++ b/Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.cpp @@ -0,0 +1,295 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "ParallelIslandDispatcher.h" + + +#include "BroadphaseCollision/CollisionAlgorithm.h" +#include "CollisionDispatch/ConvexConvexAlgorithm.h" +#include "CollisionDispatch/EmptyCollisionAlgorithm.h" +#include "CollisionDispatch/ConvexConcaveCollisionAlgorithm.h" +#include "CollisionShapes/CollisionShape.h" +#include "CollisionDispatch/CollisionObject.h" +#include + +static int gNumManifold2 = 0; + +void ParallelIslandDispatcher::FindUnions() +{ + if (m_useIslands) + { + for (int i=0;iGetManifoldByIndexInternal(i); + //static objects (invmass 0.f) don't merge ! + + const CollisionObject* colObj0 = static_cast(manifold->GetBody0()); + const CollisionObject* colObj1 = static_cast(manifold->GetBody1()); + + if (colObj0 && colObj1 && NeedsResponse(*colObj0,*colObj1)) + { + if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && + ((colObj1) && ((colObj1)->mergesSimulationIslands()))) + { + + m_unionFind.unite((colObj0)->m_islandTag1, + (colObj1)->m_islandTag1); + } + } + + + } + } + +} + + + +ParallelIslandDispatcher::ParallelIslandDispatcher (): + m_useIslands(true), + m_defaultManifoldResult(0,0,0), + m_count(0) +{ + int i; + + for (i=0;iClearManifold(); +} + + +void ParallelIslandDispatcher::ReleaseManifold(PersistentManifold* manifold) +{ + + gNumManifold2--; + + //printf("ReleaseManifold: gNumManifold2 %d\n",gNumManifold2); + + ClearManifold(manifold); + + std::vector::iterator i = + std::find(m_manifoldsPtr.begin(), m_manifoldsPtr.end(), manifold); + if (!(i == m_manifoldsPtr.end())) + { + std::swap(*i, m_manifoldsPtr.back()); + m_manifoldsPtr.pop_back(); + delete manifold; + + } + + +} + + +// +// todo: this is random access, it can be walked 'cache friendly'! +// +void ParallelIslandDispatcher::BuildAndProcessIslands(CollisionObjectArray& collisionObjects, IslandCallback* callback) +{ + int numBodies = collisionObjects.size(); + + for (int islandId=0;islandId islandmanifold; + + //int numSleeping = 0; + + bool allSleeping = true; + + int i; + for (i=0;im_islandTag1 == islandId) + { + if (colObj0->GetActivationState()== ACTIVE_TAG) + { + allSleeping = false; + } + if (colObj0->GetActivationState()== DISABLE_DEACTIVATION) + { + allSleeping = false; + } + } + } + + + for (i=0;iGetManifoldByIndexInternal(i); + + //filtering for response + + CollisionObject* colObj0 = static_cast(manifold->GetBody0()); + CollisionObject* colObj1 = static_cast(manifold->GetBody1()); + { + if (((colObj0) && (colObj0)->m_islandTag1 == (islandId)) || + ((colObj1) && (colObj1)->m_islandTag1 == (islandId))) + { + + if (NeedsResponse(*colObj0,*colObj1)) + islandmanifold.push_back(manifold); + } + } + } + if (allSleeping) + { + int i; + for (i=0;im_islandTag1 == islandId) + { + colObj0->SetActivationState( ISLAND_SLEEPING ); + } + } + + + } else + { + + int i; + for (i=0;im_islandTag1 == islandId) + { + if ( colObj0->GetActivationState() == ISLAND_SLEEPING) + { + colObj0->SetActivationState( WANTS_DEACTIVATION); + } + } + } + + /// Process the actual simulation, only if not sleeping/deactivated + if (islandmanifold.size()) + { + callback->ProcessIsland(&islandmanifold[0],islandmanifold.size()); + } + + } + } +} + + + +CollisionAlgorithm* ParallelIslandDispatcher::InternalFindAlgorithm(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1) +{ + m_count++; + CollisionObject* body0 = (CollisionObject*)proxy0.m_clientObject; + CollisionObject* body1 = (CollisionObject*)proxy1.m_clientObject; + + CollisionAlgorithmConstructionInfo ci; + ci.m_dispatcher = this; + + if (body0->m_collisionShape->IsConvex() && body1->m_collisionShape->IsConvex() ) + { + return new ConvexConvexAlgorithm(0,ci,&proxy0,&proxy1); + } + + if (body0->m_collisionShape->IsConvex() && body1->m_collisionShape->IsConcave()) + { + return new ConvexConcaveCollisionAlgorithm(ci,&proxy0,&proxy1); + } + + if (body1->m_collisionShape->IsConvex() && body0->m_collisionShape->IsConcave()) + { + return new ConvexConcaveCollisionAlgorithm(ci,&proxy1,&proxy0); + } + + //failed to find an algorithm + return new EmptyAlgorithm(ci); + +} + +bool ParallelIslandDispatcher::NeedsResponse(const CollisionObject& colObj0,const CollisionObject& colObj1) +{ + + + //here you can do filtering + bool hasResponse = + (!(colObj0.m_collisionFlags & CollisionObject::noContactResponse)) && + (!(colObj1.m_collisionFlags & CollisionObject::noContactResponse)); + hasResponse = hasResponse && + (colObj0.IsActive() || colObj1.IsActive()); + return hasResponse; +} + +bool ParallelIslandDispatcher::NeedsCollision(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1) +{ + + CollisionObject* body0 = (CollisionObject*)proxy0.m_clientObject; + CollisionObject* body1 = (CollisionObject*)proxy1.m_clientObject; + + assert(body0); + assert(body1); + + bool needsCollision = true; + + if ((body0->m_collisionFlags & CollisionObject::isStatic) && + (body1->m_collisionFlags & CollisionObject::isStatic)) + needsCollision = false; + + if ((!body0->IsActive()) && (!body1->IsActive())) + needsCollision = false; + + return needsCollision ; + +} + +///allows the user to get contact point callbacks +ManifoldResult* ParallelIslandDispatcher::GetNewManifoldResult(CollisionObject* obj0,CollisionObject* obj1,PersistentManifold* manifold) +{ + + + //in-place, this prevents parallel dispatching, but just adding a list would fix that. + ManifoldResult* manifoldResult = new (&m_defaultManifoldResult) ManifoldResult(obj0,obj1,manifold); + return manifoldResult; +} + +///allows the user to get contact point callbacks +void ParallelIslandDispatcher::ReleaseManifoldResult(ManifoldResult*) +{ + +} diff --git a/Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.h b/Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.h new file mode 100644 index 000000000..0d904a344 --- /dev/null +++ b/Extras/PhysicsInterface/CcdPhysics/ParallelIslandDispatcher.h @@ -0,0 +1,126 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef PARALLEL_ISLAND_DISPATCHER_H +#define PARALLEL_ISLAND_DISPATCHER_H + +#include "BroadphaseCollision/Dispatcher.h" +#include "NarrowPhaseCollision/PersistentManifold.h" +#include "CollisionDispatch/UnionFind.h" +#include "CollisionDispatch/ManifoldResult.h" + +#include "BroadphaseCollision/BroadphaseProxy.h" +#include + +class IDebugDraw; + + +#include "CollisionDispatch/CollisionCreateFunc.h" + + + + +///ParallelIslandDispatcher dispatches entire simulation islands in parallel. +///For both collision detection and constraint solving. +///This development heads toward multi-core, CELL SPU and GPU approach +class ParallelIslandDispatcher : public Dispatcher +{ + + std::vector m_manifoldsPtr; + + UnionFind m_unionFind; + + bool m_useIslands; + + ManifoldResult m_defaultManifoldResult; + + CollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLLISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES]; + +public: + + UnionFind& GetUnionFind() { return m_unionFind;} + + struct IslandCallback + { + virtual ~IslandCallback() {}; + + virtual void ProcessIsland(PersistentManifold** manifolds,int numManifolds) = 0; + }; + + + int GetNumManifolds() const + { + return m_manifoldsPtr.size(); + } + + PersistentManifold* GetManifoldByIndexInternal(int index) + { + return m_manifoldsPtr[index]; + } + + const PersistentManifold* GetManifoldByIndexInternal(int index) const + { + return m_manifoldsPtr[index]; + } + + void InitUnionFind(int n) + { + if (m_useIslands) + m_unionFind.reset(n); + } + + void FindUnions(); + + int m_count; + + ParallelIslandDispatcher (); + virtual ~ParallelIslandDispatcher() {}; + + virtual PersistentManifold* GetNewManifold(void* b0,void* b1); + + virtual void ReleaseManifold(PersistentManifold* manifold); + + + virtual void BuildAndProcessIslands(CollisionObjectArray& collisionObjects, IslandCallback* callback); + + ///allows the user to get contact point callbacks + virtual ManifoldResult* GetNewManifoldResult(CollisionObject* obj0,CollisionObject* obj1,PersistentManifold* manifold); + + ///allows the user to get contact point callbacks + virtual void ReleaseManifoldResult(ManifoldResult*); + + virtual void ClearManifold(PersistentManifold* manifold); + + + CollisionAlgorithm* FindAlgorithm(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1) + { + CollisionAlgorithm* algo = InternalFindAlgorithm(proxy0,proxy1); + return algo; + } + + CollisionAlgorithm* InternalFindAlgorithm(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1); + + virtual bool NeedsCollision(BroadphaseProxy& proxy0,BroadphaseProxy& proxy1); + + virtual bool NeedsResponse(const CollisionObject& colObj0,const CollisionObject& colObj1); + + virtual int GetUniqueId() { return RIGIDBODY_DISPATCHER;} + + + +}; + +#endif //PARALLEL_ISLAND_DISPATCHER_H + diff --git a/Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.cpp b/Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.cpp new file mode 100644 index 000000000..7e765d5fb --- /dev/null +++ b/Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.cpp @@ -0,0 +1,406 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#include "ParallelPhysicsEnvironment.h" +#include "CcdPhysicsController.h" +#include "ParallelIslandDispatcher.h" + + +ParallelPhysicsEnvironment::ParallelPhysicsEnvironment(ParallelIslandDispatcher* dispatcher, OverlappingPairCache* pairCache): +CcdPhysicsEnvironment(0,pairCache) +{ + +} + +ParallelPhysicsEnvironment::~ParallelPhysicsEnvironment() +{ + +} + + + +/// Perform an integration step of duration 'timeStep'. +bool ParallelPhysicsEnvironment::proceedDeltaTimeOneStep(float timeStep) +{ + +/* + //printf("CcdPhysicsEnvironment::proceedDeltaTime\n"); + + if (SimdFuzzyZero(timeStep)) + return true; + + if (m_debugDrawer) + { + gDisableDeactivation = (m_debugDrawer->GetDebugMode() & IDebugDraw::DBG_NoDeactivation); + } + + +#ifdef USE_QUICKPROF + Profiler::beginBlock("SyncMotionStates"); +#endif //USE_QUICKPROF + + + //this is needed because scaling is not known in advance, and scaling has to propagate to the shape + if (!m_scalingPropagated) + { + SyncMotionStates(timeStep); + m_scalingPropagated = true; + } + + +#ifdef USE_QUICKPROF + Profiler::endBlock("SyncMotionStates"); + + Profiler::beginBlock("predictIntegratedTransform"); +#endif //USE_QUICKPROF + + { + // std::vector::iterator i; + + + + int k; + for (k=0;kGetRigidBody(); + if (body->IsActive()) + { + if (!body->IsStatic()) + { + body->applyForces( timeStep); + body->integrateVelocities( timeStep); + body->predictIntegratedTransform(timeStep,body->m_interpolationWorldTransform); + } + } + + } + } + +#ifdef USE_QUICKPROF + Profiler::endBlock("predictIntegratedTransform"); +#endif //USE_QUICKPROF + + BroadphaseInterface* scene = GetBroadphase(); + + + // + // collision detection (?) + // + + +#ifdef USE_QUICKPROF + Profiler::beginBlock("DispatchAllCollisionPairs"); +#endif //USE_QUICKPROF + + + int numsubstep = m_numIterations; + + + DispatcherInfo dispatchInfo; + dispatchInfo.m_timeStep = timeStep; + dispatchInfo.m_stepCount = 0; + dispatchInfo.m_enableSatConvex = m_enableSatCollisionDetection; + + scene->DispatchAllCollisionPairs(*GetDispatcher(),dispatchInfo);///numsubstep,g); + + +#ifdef USE_QUICKPROF + Profiler::endBlock("DispatchAllCollisionPairs"); +#endif //USE_QUICKPROF + + + int numRigidBodies = m_controllers.size(); + + m_collisionWorld->UpdateActivationState(); + + { + int i; + int numConstraints = m_constraints.size(); + for (i=0;i< numConstraints ; i++ ) + { + TypedConstraint* constraint = m_constraints[i]; + + const RigidBody* colObj0 = &constraint->GetRigidBodyA(); + const RigidBody* colObj1 = &constraint->GetRigidBodyB(); + + if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && + ((colObj1) && ((colObj1)->mergesSimulationIslands()))) + { + if (colObj0->IsActive() || colObj1->IsActive()) + { + GetDispatcher()->GetUnionFind().unite((colObj0)->m_islandTag1, + (colObj1)->m_islandTag1); + } + } + } + } + + m_collisionWorld->StoreIslandActivationState(); + + + + //contacts +#ifdef USE_QUICKPROF + Profiler::beginBlock("SolveConstraint"); +#endif //USE_QUICKPROF + + + //solve the regular constraints (point 2 point, hinge, etc) + + for (int g=0;gBuildJacobian(); + constraint->SolveConstraint( timeStep ); + + } + + + } + +#ifdef USE_QUICKPROF + Profiler::endBlock("SolveConstraint"); +#endif //USE_QUICKPROF + + //solve the vehicles + +#ifdef NEW_BULLET_VEHICLE_SUPPORT + //vehicles + int numVehicles = m_wrapperVehicles.size(); + for (int i=0;iGetVehicle(); + vehicle->UpdateVehicle( timeStep); + } +#endif //NEW_BULLET_VEHICLE_SUPPORT + + + struct InplaceSolverIslandCallback : public ParallelIslandDispatcher::IslandCallback + { + + ContactSolverInfo& m_solverInfo; + ConstraintSolver* m_solver; + IDebugDraw* m_debugDrawer; + + InplaceSolverIslandCallback( + ContactSolverInfo& solverInfo, + ConstraintSolver* solver, + IDebugDraw* debugDrawer) + :m_solverInfo(solverInfo), + m_solver(solver), + m_debugDrawer(debugDrawer) + { + + } + + virtual void ProcessIsland(PersistentManifold** manifolds,int numManifolds) + { + m_solver->SolveGroup( manifolds, numManifolds,m_solverInfo,m_debugDrawer); + } + + }; + + + m_solverInfo.m_friction = 0.9f; + m_solverInfo.m_numIterations = m_numIterations; + m_solverInfo.m_timeStep = timeStep; + m_solverInfo.m_restitution = 0.f;//m_restitution; + + InplaceSolverIslandCallback solverCallback( + m_solverInfo, + m_solver, + m_debugDrawer); + +#ifdef USE_QUICKPROF + Profiler::beginBlock("BuildAndProcessIslands"); +#endif //USE_QUICKPROF + + /// solve all the contact points and contact friction + GetDispatcher()->BuildAndProcessIslands(m_collisionWorld->GetCollisionObjectArray(),&solverCallback); + +#ifdef USE_QUICKPROF + Profiler::endBlock("BuildAndProcessIslands"); + + Profiler::beginBlock("CallbackTriggers"); +#endif //USE_QUICKPROF + + CallbackTriggers(); + +#ifdef USE_QUICKPROF + Profiler::endBlock("CallbackTriggers"); + + + Profiler::beginBlock("proceedToTransform"); + +#endif //USE_QUICKPROF + { + + + + { + + + + UpdateAabbs(timeStep); + + + float toi = 1.f; + + + + if (m_ccdMode == 3) + { + DispatcherInfo dispatchInfo; + dispatchInfo.m_timeStep = timeStep; + dispatchInfo.m_stepCount = 0; + dispatchInfo.m_dispatchFunc = DispatcherInfo::DISPATCH_CONTINUOUS; + + scene->DispatchAllCollisionPairs( *GetDispatcher(),dispatchInfo);///numsubstep,g); + toi = dispatchInfo.m_timeOfImpact; + + } + + + + // + // integrating solution + // + + { + + std::vector::iterator i; + + for (i=m_controllers.begin(); + !(i==m_controllers.end()); i++) + { + + CcdPhysicsController* ctrl = *i; + + SimdTransform predictedTrans; + RigidBody* body = ctrl->GetRigidBody(); + + if (body->IsActive()) + { + + if (!body->IsStatic()) + { + body->predictIntegratedTransform(timeStep* toi, predictedTrans); + body->proceedToTransform( predictedTrans); + } + + } + } + + } + + + + + + // + // disable sleeping physics objects + // + + std::vector m_sleepingControllers; + + std::vector::iterator i; + + for (i=m_controllers.begin(); + !(i==m_controllers.end()); i++) + { + CcdPhysicsController* ctrl = (*i); + RigidBody* body = ctrl->GetRigidBody(); + + ctrl->UpdateDeactivation(timeStep); + + + if (ctrl->wantsSleeping()) + { + if (body->GetActivationState() == ACTIVE_TAG) + body->SetActivationState( WANTS_DEACTIVATION ); + } else + { + if (body->GetActivationState() != DISABLE_DEACTIVATION) + body->SetActivationState( ACTIVE_TAG ); + } + + if (useIslands) + { + if (body->GetActivationState() == ISLAND_SLEEPING) + { + m_sleepingControllers.push_back(ctrl); + } + } else + { + if (ctrl->wantsSleeping()) + { + m_sleepingControllers.push_back(ctrl); + } + } + } + + + + + } + + +#ifdef USE_QUICKPROF + Profiler::endBlock("proceedToTransform"); + + Profiler::beginBlock("SyncMotionStates"); +#endif //USE_QUICKPROF + + SyncMotionStates(timeStep); + +#ifdef USE_QUICKPROF + Profiler::endBlock("SyncMotionStates"); + + Profiler::endProfilingCycle(); +#endif //USE_QUICKPROF + + +#ifdef NEW_BULLET_VEHICLE_SUPPORT + //sync wheels for vehicles + int numVehicles = m_wrapperVehicles.size(); + for (int i=0;iSyncWheels(); + } +#endif //NEW_BULLET_VEHICLE_SUPPORT + } +*/ + + return true; +} diff --git a/Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.h b/Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.h new file mode 100644 index 000000000..a5f0efb67 --- /dev/null +++ b/Extras/PhysicsInterface/CcdPhysics/ParallelPhysicsEnvironment.h @@ -0,0 +1,42 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef PARALLELPHYSICSENVIRONMENT +#define PARALLELPHYSICSENVIRONMENT + +#include "CcdPhysicsEnvironment.h" +class ParallelIslandDispatcher; + + +/// ParallelPhysicsEnvironment is experimental parallel mainloop for physics simulation +/// Physics Environment takes care of stepping the simulation and is a container for physics entities. +/// It stores rigidbodies,constraints, materials etc. +/// A derived class may be able to 'construct' entities by loading and/or converting +class ParallelPhysicsEnvironment : public CcdPhysicsEnvironment +{ + + + public: + ParallelPhysicsEnvironment(ParallelIslandDispatcher* dispatcher=0, OverlappingPairCache* pairCache=0); + + virtual ~ParallelPhysicsEnvironment(); + + + /// Perform an integration step of duration 'timeStep'. + bool proceedDeltaTimeOneStep(float timeStep); + +}; + +#endif //PARALLELPHYSICSENVIRONMENT diff --git a/msvc/8/libbulletccdphysics.vcproj b/msvc/8/libbulletccdphysics.vcproj index 1d7fc9b1b..51f42b2a9 100644 --- a/msvc/8/libbulletccdphysics.vcproj +++ b/msvc/8/libbulletccdphysics.vcproj @@ -1,15 +1,17 @@ - + + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> - - - - - - + Name="VCManagedResourceCompilerTool" + /> + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="..\..\out\release8\libs\libbulletccdphysics.lib" + SuppressStartupBanner="true" + /> + + + + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="0" + /> - - - - - - + Name="VCManagedResourceCompilerTool" + /> + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="..\..\out\debug8\libs\libbulletccdphysics_d.lib" + SuppressStartupBanner="true" + /> + + + + + + + + > + RelativePath="..\..\Extras\PhysicsInterface\CcdPhysics\CcdPhysicsController.cpp" + > + RelativePath="..\..\Extras\PhysicsInterface\CcdPhysics\CcdPhysicsEnvironment.cpp" + > + > + RelativePath="..\..\Extras\PhysicsInterface\CcdPhysics\CcdPhysicsController.h" + > + RelativePath="..\..\Extras\PhysicsInterface\CcdPhysics\CcdPhysicsEnvironment.h" + > + + + + + + + + diff --git a/msvc/8/libbulletdynamics.vcproj b/msvc/8/libbulletdynamics.vcproj index aab4ab538..350591270 100644 --- a/msvc/8/libbulletdynamics.vcproj +++ b/msvc/8/libbulletdynamics.vcproj @@ -1,15 +1,17 @@ - + + > + Name="Win32" + /> + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> - - - - - - + Name="VCManagedResourceCompilerTool" + /> + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="..\..\out\release8\libs\libbulletdynamics.lib" + SuppressStartupBanner="true" + /> + + + + + + ATLMinimizesCRunTimeLibraryUsage="false" + > + + + + + + SuppressStartupBanner="true" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="0" + /> - - - - - - + Name="VCManagedResourceCompilerTool" + /> + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="..\..\out\debug8\libs\libbulletdynamics_d.lib" + SuppressStartupBanner="true" + /> + + + + + + + + > + RelativePath="..\..\BulletDynamics\Dynamics\BU_Joint.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\ContactConstraint.cpp" + > + RelativePath="..\..\BulletDynamics\Dynamics\ContactJoint.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\Generic6DofConstraint.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\HingeConstraint.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\Point2PointConstraint.cpp" + > + RelativePath="..\..\BulletDynamics\Dynamics\RigidBody.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\SequentialImpulseConstraintSolver.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\Solve2LinearConstraint.cpp" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\TypedConstraint.cpp" + > + > + RelativePath="..\..\BulletDynamics\Dynamics\BU_Joint.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\ConstraintSolver.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\ContactConstraint.h" + > + RelativePath="..\..\BulletDynamics\Dynamics\ContactJoint.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\ContactSolverInfo.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\Generic6DofConstraint.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\HingeConstraint.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\JacobianEntry.h" + > + RelativePath="..\..\BulletDynamics\Dynamics\MassProps.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\Point2PointConstraint.h" + > + RelativePath="..\..\BulletDynamics\Dynamics\RigidBody.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\SequentialImpulseConstraintSolver.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\Solve2LinearConstraint.h" + > + RelativePath="..\..\BulletDynamics\ConstraintSolver\TypedConstraint.h" + >