Add an 'extension' pointer to btCollisionObject for some of our Bullet extentions (a custom constraint solver that needs a back-pointer)
This commit is contained in:
@@ -23,6 +23,7 @@ btCollisionObject::btCollisionObject()
|
|||||||
m_contactProcessingThreshold(BT_LARGE_FLOAT),
|
m_contactProcessingThreshold(BT_LARGE_FLOAT),
|
||||||
m_broadphaseHandle(0),
|
m_broadphaseHandle(0),
|
||||||
m_collisionShape(0),
|
m_collisionShape(0),
|
||||||
|
m_extensionPointer(0),
|
||||||
m_rootCollisionShape(0),
|
m_rootCollisionShape(0),
|
||||||
m_collisionFlags(btCollisionObject::CF_STATIC_OBJECT),
|
m_collisionFlags(btCollisionObject::CF_STATIC_OBJECT),
|
||||||
m_islandTag1(-1),
|
m_islandTag1(-1),
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ protected:
|
|||||||
|
|
||||||
btBroadphaseProxy* m_broadphaseHandle;
|
btBroadphaseProxy* m_broadphaseHandle;
|
||||||
btCollisionShape* m_collisionShape;
|
btCollisionShape* m_collisionShape;
|
||||||
|
///m_extensionPointer is used by some internal low-level Bullet extensions.
|
||||||
|
void* m_extensionPointer;
|
||||||
|
|
||||||
///m_rootCollisionShape is temporarily used to store the original collision shape
|
///m_rootCollisionShape is temporarily used to store the original collision shape
|
||||||
///The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes
|
///The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes
|
||||||
@@ -221,6 +223,19 @@ public:
|
|||||||
m_collisionShape = collisionShape;
|
m_collisionShape = collisionShape;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///Avoid using this internal API call, the extension pointer is used by some Bullet extensions.
|
||||||
|
///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
|
||||||
|
void* internalGetExtensionPointer() const
|
||||||
|
{
|
||||||
|
return m_extensionPointer;
|
||||||
|
}
|
||||||
|
///Avoid using this internal API call, the extension pointer is used by some Bullet extensions
|
||||||
|
///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
|
||||||
|
void internalSetExtensionPointer(void* pointer)
|
||||||
|
{
|
||||||
|
m_extensionPointer = pointer;
|
||||||
|
}
|
||||||
|
|
||||||
SIMD_FORCE_INLINE int getActivationState() const { return m_activationState1;}
|
SIMD_FORCE_INLINE int getActivationState() const { return m_activationState1;}
|
||||||
|
|
||||||
void setActivationState(int newState);
|
void setActivationState(int newState);
|
||||||
|
|||||||
Reference in New Issue
Block a user