fixed IBM Cell sdk build + demo (need to review related patch), thanks Jochen for reporting the issues.
This commit is contained in:
@@ -21,7 +21,7 @@ subject to the following restrictions:
|
||||
|
||||
//#define USE_SIMPLE_DYNAMICS_WORLD 1
|
||||
|
||||
int gNumObjects = 120;
|
||||
int gNumObjects = 5;
|
||||
#define HALF_EXTENTS btScalar(1.)
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
#include "BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h"
|
||||
@@ -53,7 +53,7 @@ int main(int argc,char** argv)
|
||||
ccdDemo.initPhysics();
|
||||
|
||||
int i;
|
||||
for (i=0;i<1000;i++)
|
||||
for (i=0;i<5;i++)
|
||||
ccdDemo.clientMoveAndDisplay();
|
||||
ccdDemo.exitPhysics();
|
||||
|
||||
@@ -63,8 +63,6 @@ int main(int argc,char** argv)
|
||||
|
||||
|
||||
extern int gNumManifold;
|
||||
extern int gOverlappingPairs;
|
||||
extern int gTotalContactPoints;
|
||||
|
||||
void BasicDemo::clientMoveAndDisplay()
|
||||
{
|
||||
@@ -81,12 +79,25 @@ void BasicDemo::clientMoveAndDisplay()
|
||||
|
||||
//some additional debugging info
|
||||
#ifdef PRINT_CONTACT_STATISTICS
|
||||
printf("num manifolds: %i\n",gNumManifold);
|
||||
printf("num gOverlappingPairs: %i\n",gOverlappingPairs);
|
||||
printf("num gTotalContactPoints : %i\n",gTotalContactPoints );
|
||||
printf("num contact manifolds: %i\n",gNumManifold);
|
||||
int numManifolds = m_dynamicsWorld->getDispatcher()->getNumManifolds();
|
||||
for (int i=0;i<numManifolds;i++)
|
||||
{
|
||||
btPersistentManifold* contactManifold = m_dynamicsWorld->getDispatcher()->getManifoldByIndexInternal(i);
|
||||
btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0());
|
||||
btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1());
|
||||
|
||||
int numContacts = contactManifold->getNumContacts();
|
||||
for (int j=0;j<numContacts;j++)
|
||||
{
|
||||
btManifoldPoint& pt = contactManifold->getContactPoint(j);
|
||||
btVector3 ptA = pt.getPositionWorldOnA();
|
||||
btVector3 ptB = pt.getPositionWorldOnB();
|
||||
printf("contact manifold[%d],pointA[%d]=(%f,%f,%f)\n",i,j,ptA[0],ptA[1],ptA[2]);
|
||||
}
|
||||
}
|
||||
#endif //PRINT_CONTACT_STATISTICS
|
||||
|
||||
gTotalContactPoints = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
|
||||
class Edge
|
||||
{
|
||||
|
||||
@@ -64,6 +64,7 @@ btSimulationIslandManager.o \
|
||||
btSphereBoxCollisionAlgorithm.o \
|
||||
btSphereSphereCollisionAlgorithm.o \
|
||||
btSphereTriangleCollisionAlgorithm.o \
|
||||
btActivatingCollisionAlgorithm.o \
|
||||
btUnionFind.o \
|
||||
SphereTriangleDetector.o \
|
||||
btBoxShape.o \
|
||||
|
||||
@@ -120,6 +120,9 @@ btAlignedAllocator : MakeOut
|
||||
SpuGatheringCollisionDispatcher : MakeOut
|
||||
$(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
|
||||
|
||||
SequentialThreadSupport: MakeOut
|
||||
$(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
|
||||
|
||||
SpuLibspe2Support: MakeOut
|
||||
$(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ subject to the following restrictions:
|
||||
|
||||
#include "SpuCollisionShapes.h"
|
||||
|
||||
#ifdef __SPU__
|
||||
///not supported on IBM SDK, until we fix the alignment of btVector3
|
||||
#if defined (__CELLOS_LV2__) && defined (__SPU__)
|
||||
#include <spu_intrinsics.h>
|
||||
static inline vec_float4 vec_dot3( vec_float4 vec0, vec_float4 vec1 )
|
||||
{
|
||||
@@ -181,7 +182,7 @@ btVector3 localGetSupportingVertexWithoutMargin(int shapeType, void* shape, cons
|
||||
{
|
||||
//spu_printf("SPU: todo: getSupport CONVEX_HULL_SHAPE_PROXYTYPE\n");
|
||||
|
||||
#if defined (__SPU__)
|
||||
#if defined (__CELLOS_LV2__) && defined (__SPU__)
|
||||
vec_float4 v_distMax = {-FLT_MAX,0,0,0};
|
||||
vec_int4 v_idxMax = {-999,0,0,0};
|
||||
int v=0;
|
||||
|
||||
Reference in New Issue
Block a user