another large series of changes, related to the refactoring.

CompoundShapes are tricky to manage with respect to persistent contact points and swapped order of btCollisionObjects,
During dispatch, finding an algorith etc. order can be swapped.
fixed several other issues, related to SimpleBroadphase (removing a proxy was not working)
This commit is contained in:
ejcoumans
2006-10-06 05:22:13 +00:00
parent 97b287a6bc
commit bf847b839a
54 changed files with 1852 additions and 1946 deletions

View File

@@ -21,6 +21,7 @@ subject to the following restrictions:
struct btCollisionObject;
class btPersistentManifold;
class btManifoldPoint;
#include "LinearMath/btTransform.h"
typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1);
extern ContactAddedCallback gContactAddedCallback;
@@ -31,6 +32,11 @@ extern ContactAddedCallback gContactAddedCallback;
class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result
{
btPersistentManifold* m_manifoldPtr;
//we need this for compounds
btTransform m_rootTransA;
btTransform m_rootTransB;
btCollisionObject* m_body0;
btCollisionObject* m_body1;
int m_partId0;
@@ -39,10 +45,19 @@ class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result
int m_index1;
public:
btManifoldResult(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* manifoldPtr);
btManifoldResult()
{
}
btManifoldResult(btCollisionObject* body0,btCollisionObject* body1);
virtual ~btManifoldResult() {};
void setPersistentManifold(btPersistentManifold* manifoldPtr)
{
m_manifoldPtr = manifoldPtr;
}
virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1)
{
m_partId0=partId0;