1)Added SCE Physics Effects boxBoxDistance

BulletMultiThreaded/NarrowPhaseCollision makes use of this boxBoxDistance.
Cache some values in src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp, to avoid DMA transfers

2) Added btConvexSeparatingDistanceUtil: this allows caching of separating distance/vector as early-out to avoid convex-convex collision detection.
btConvexSeparatingDistanceUtil is used in src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp and can be controlled by btDispatcherInfo.m_useConvexConservativeDistanceUtil/m_convexConservativeDistanceThreshold

3) Use BulletMultiThreaded/vectormath/scalar/cpp/vectormath/scalar/cpp/vectormath_aos.h as fallback for non-PlayStation 3 Cell SPU/PPU platforms (used by boxBoxDistance).
Note there are other implementations in Extras/vectormath folder, that are potentially faster for IBM Cell SDK 3.0 SPU (libspe2)
This commit is contained in:
erwin.coumans
2008-10-20 20:12:39 +00:00
parent b95810245f
commit e6202f58ad
22 changed files with 6716 additions and 49 deletions

View File

@@ -26,6 +26,11 @@ subject to the following restrictions:
#include "Taru.mdl"
#include "landscape.mdl"
#include "BulletCollision/BroadphaseCollision/btDbvtBroadphase.h"
#include "BulletMultiThreaded/SpuGatheringCollisionDispatcher.h"
#include "BulletMultiThreaded/SequentialThreadSupport.h"
#include "BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
@@ -268,6 +273,16 @@ void BenchmarkDemo::initPhysics()
///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
#if 0
SequentialThreadSupport::SequentialThreadConstructionInfo sci("spuCD",
processCollisionTask,
createCollisionLocalStoreMemory);
SequentialThreadSupport* seq = new SequentialThreadSupport(sci);
m_dispatcher = new SpuGatheringCollisionDispatcher(seq,1,m_collisionConfiguration);
#endif
///the maximum size of the collision world. Make sure objects stay within these boundaries
///Don't make the world AABB size too large, it will harm simulation quality and performance
btVector3 worldAabbMin(-10000,-10000,-10000);
@@ -1132,9 +1147,9 @@ void BenchmarkDemo::castRays()
void BenchmarkDemo::createTest7()
{
setCameraDistance(btScalar(150.));
createTest6();
setCameraDistance(btScalar(150.));
initRays();
}