Implement btTypedConstaint::setUserConstraintPtr/setUserConstraintPtr (data shared with get/setUserConstraintId)
This commit is contained in:
@@ -53,7 +53,13 @@ enum btConstraintParams
|
|||||||
class btTypedConstraint : public btTypedObject
|
class btTypedConstraint : public btTypedObject
|
||||||
{
|
{
|
||||||
int m_userConstraintType;
|
int m_userConstraintType;
|
||||||
int m_userConstraintId;
|
|
||||||
|
union
|
||||||
|
{
|
||||||
|
int m_userConstraintId;
|
||||||
|
void* m_userConstraintPtr;
|
||||||
|
};
|
||||||
|
|
||||||
bool m_needsFeedback;
|
bool m_needsFeedback;
|
||||||
|
|
||||||
btTypedConstraint& operator=(btTypedConstraint& other)
|
btTypedConstraint& operator=(btTypedConstraint& other)
|
||||||
@@ -192,6 +198,16 @@ public:
|
|||||||
return m_userConstraintId;
|
return m_userConstraintId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setUserConstraintPtr(void* ptr)
|
||||||
|
{
|
||||||
|
m_userConstraintPtr = ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* getUserConstraintPtr()
|
||||||
|
{
|
||||||
|
return m_userConstraintPtr;
|
||||||
|
}
|
||||||
|
|
||||||
int getUid() const
|
int getUid() const
|
||||||
{
|
{
|
||||||
return m_userConstraintId;
|
return m_userConstraintId;
|
||||||
|
|||||||
Reference in New Issue
Block a user