added debug rendering for planeshape
added void* userpointer (+getUserPointer/setUserPointer) to each btCollisionShape
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user