Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h
index 964b6a04483..927e2bc4f76 100644
--- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h
+++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h
@@ -28,11 +28,14 @@ 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.
class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result
{
+protected:
+
btPersistentManifold* m_manifoldPtr;
//we need this for compounds
@@ -50,6 +53,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 +81,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 +113,16 @@ public:
}
}
+ const btCollisionObject* getBody0Internal() const
+ {
+ return m_body0;
+ }
+ const btCollisionObject* getBody1Internal() const
+ {
+ return m_body1;
+ }
+
};
#endif //MANIFOLD_RESULT_H