Apple contribution for OSX SSE and iOS NEON optimizations unit tests, thanks to Jordan Hubbard, Ian Ollmann and Hristo Hristov.

For OSX:
cd build
./premake_osx xcode4
for iOS:
cd build
./ios_build.sh
./ios_run.sh

Also integrated the branches/StackAllocation to make it easier to multi-thread collision detection in the near future. It avoids changing the btCollisionObject while performing collision detection.

As this is a large patch, some stuff might be temporarily broken, I'll keep an eye out on issues.
This commit is contained in:
erwin.coumans
2012-06-07 00:56:30 +00:00
parent 777b92a2ad
commit 73b217fb07
323 changed files with 30730 additions and 13635 deletions

View File

@@ -58,7 +58,7 @@ struct btSparseSdf
int c[3];
int puid;
unsigned hash;
btCollisionShape* pclient;
const btCollisionShape* pclient;
Cell* next;
};
//
@@ -152,7 +152,7 @@ struct btSparseSdf
}
//
btScalar Evaluate( const btVector3& x,
btCollisionShape* shape,
const btCollisionShape* shape,
btVector3& normal,
btScalar margin)
{
@@ -248,14 +248,14 @@ struct btSparseSdf
}
//
static inline btScalar DistanceToShape(const btVector3& x,
btCollisionShape* shape)
const btCollisionShape* shape)
{
btTransform unit;
unit.setIdentity();
if(shape->isConvex())
{
btGjkEpaSolver2::sResults res;
btConvexShape* csh=static_cast<btConvexShape*>(shape);
const btConvexShape* csh=static_cast<const btConvexShape*>(shape);
return(btGjkEpaSolver2::SignedDistance(x,0,csh,unit,res));
}
return(0);
@@ -282,7 +282,7 @@ struct btSparseSdf
//
static inline unsigned int Hash(int x,int y,int z,btCollisionShape* shape)
static inline unsigned int Hash(int x,int y,int z,const btCollisionShape* shape)
{
struct btS
{
@@ -292,7 +292,7 @@ struct btSparseSdf
btS myset;
myset.x=x;myset.y=y;myset.z=z;myset.p=shape;
myset.x=x;myset.y=y;myset.z=z;myset.p=(void*)shape;
const void* ptr = &myset;
unsigned int result = HsiehHash<sizeof(btS)/4> (ptr);