added debug rendering for planeshape

added void* userpointer (+getUserPointer/setUserPointer) to each btCollisionShape
This commit is contained in:
ejcoumans
2008-01-23 03:06:15 +00:00
parent 63dc666bf6
commit 6eb97cd966
3 changed files with 40 additions and 5 deletions

View File

@@ -25,9 +25,12 @@ subject to the following restrictions:
///btCollisionShape provides interface for collision shapes that can be shared among btCollisionObjects.
class btCollisionShape
{
void* m_userPointer;
public:
btCollisionShape()
btCollisionShape() : m_userPointer(0)
{
}
virtual ~btCollisionShape()
@@ -88,6 +91,19 @@ public:
virtual void setMargin(btScalar margin) = 0;
virtual btScalar getMargin() const = 0;
///optional user data pointer
void setUserPointer(void* userPtr)
{
m_userPointer = userPtr;
}
void* getUserPointer() const
{
return m_userPointer;
}
};
#endif //COLLISION_SHAPE_H

View File

@@ -17,10 +17,7 @@ class btConvexInternalShape : public btConvexShape
btScalar m_collisionMargin;
btScalar m_padding[2];
btScalar m_padding;
public:
@@ -93,6 +90,8 @@ public:
btAssert(0);
}
};