Add support for childshape index for btCompoundShape during ContactAddedCallback,
see example in Bullet/Demos/ConvexDecompositionDemo Removed some warnings
This commit is contained in:
@@ -28,6 +28,7 @@ class btManifoldPoint;
|
||||
typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1);
|
||||
extern ContactAddedCallback gContactAddedCallback;
|
||||
|
||||
//#define DEBUG_PART_INDEX 1
|
||||
|
||||
|
||||
///btManifoldResult is a helper class to manage contact results.
|
||||
@@ -50,6 +51,13 @@ class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result
|
||||
public:
|
||||
|
||||
btManifoldResult()
|
||||
#ifdef DEBUG_PART_INDEX
|
||||
:
|
||||
m_partId0(-1),
|
||||
m_partId1(-1),
|
||||
m_index0(-1),
|
||||
m_index1(-1)
|
||||
#endif //DEBUG_PART_INDEX
|
||||
{
|
||||
}
|
||||
|
||||
@@ -71,12 +79,16 @@ public:
|
||||
return m_manifoldPtr;
|
||||
}
|
||||
|
||||
virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1)
|
||||
virtual void setShapeIdentifiersA(int partId0,int index0)
|
||||
{
|
||||
m_partId0=partId0;
|
||||
m_partId1=partId1;
|
||||
m_index0=index0;
|
||||
m_index1=index1;
|
||||
m_partId0=partId0;
|
||||
m_index0=index0;
|
||||
}
|
||||
|
||||
virtual void setShapeIdentifiersB( int partId1,int index1)
|
||||
{
|
||||
m_partId1=partId1;
|
||||
m_index1=index1;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +111,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
const btCollisionObject* getBody0Internal() const
|
||||
{
|
||||
return m_body0;
|
||||
}
|
||||
|
||||
const btCollisionObject* getBody1Internal() const
|
||||
{
|
||||
return m_body1;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //MANIFOLD_RESULT_H
|
||||
|
||||
Reference in New Issue
Block a user