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

@@ -60,7 +60,7 @@ LINK_LIBRARIES(
ConvexDecompositionDemo.cpp
ConvexDecompositionDemo.h
Win32ConvexDecompositionDemo.cpp
${BULLET_PHYSICS_SOURCE_DIR}/msvc/bullet.rc
${BULLET_PHYSICS_SOURCE_DIR}/build/bullet.rc
)
ENDIF (USE_GLUT)

View File

@@ -80,24 +80,24 @@ void ConvexDecompositionDemo::initPhysics()
///MyContactCallback is just an example to show how to get access to the child shape that collided
bool MyContactCallback (
btManifoldPoint& cp,
const btCollisionObject* colObj0,
const btCollisionObjectWrapper* colObj0Wrap,
int partId0,
int index0,
const btCollisionObject* colObj1,
const btCollisionObjectWrapper* colObj1Wrap,
int partId1,
int index1)
{
if (colObj0->getRootCollisionShape()->getShapeType()==COMPOUND_SHAPE_PROXYTYPE)
if (colObj0Wrap->getCollisionObject()->getCollisionShape()->getShapeType()==COMPOUND_SHAPE_PROXYTYPE)
{
btCompoundShape* compound = (btCompoundShape*)colObj0->getRootCollisionShape();
btCompoundShape* compound = (btCompoundShape*)colObj0Wrap->getCollisionObject()->getCollisionShape();
btCollisionShape* childShape;
childShape = compound->getChildShape(index0);
}
if (colObj1->getRootCollisionShape()->getShapeType()==COMPOUND_SHAPE_PROXYTYPE)
if (colObj1Wrap->getCollisionObject()->getCollisionShape()->getShapeType()==COMPOUND_SHAPE_PROXYTYPE)
{
btCompoundShape* compound = (btCompoundShape*)colObj1->getRootCollisionShape();
btCompoundShape* compound = (btCompoundShape*)colObj1Wrap->getCollisionObject()->getCollisionShape();
btCollisionShape* childShape;
childShape = compound->getChildShape(index1);
}

View File

@@ -36,13 +36,14 @@ class btDefaultCollisionConfiguration;
class btTriangleMesh;
///ConvexDecompositionDemo shows automatic convex decomposition of a concave mesh
class ConvexDecompositionDemo : public PlatformDemoApplication
ATTRIBUTE_ALIGNED16(class) ConvexDecompositionDemo : public PlatformDemoApplication
{
void setupEmptyDynamicsWorld();
public:
BT_DECLARE_ALIGNED_ALLOCATOR();
//keep the collision shapes, for deletion/cleanup
btAlignedObjectArray<btCollisionShape*> m_collisionShapes;