Add a btTypedUserInfo field to btTypedConstraint
This commit is contained in:
@@ -23,6 +23,7 @@ btTypedConstraint::btTypedConstraint(btTypedConstraintType type)
|
||||
:m_userConstraintType(-1),
|
||||
m_userConstraintId(-1),
|
||||
m_constraintType (type),
|
||||
m_typedUserInfo(0),
|
||||
m_rbA(s_fixed),
|
||||
m_rbB(s_fixed),
|
||||
m_appliedImpulse(btScalar(0.))
|
||||
@@ -32,6 +33,7 @@ m_appliedImpulse(btScalar(0.))
|
||||
btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA)
|
||||
:m_userConstraintType(-1),
|
||||
m_userConstraintId(-1),
|
||||
m_typedUserInfo(0),
|
||||
m_constraintType (type),
|
||||
m_rbA(rbA),
|
||||
m_rbB(s_fixed),
|
||||
@@ -45,6 +47,7 @@ m_appliedImpulse(btScalar(0.))
|
||||
btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB)
|
||||
:m_userConstraintType(-1),
|
||||
m_userConstraintId(-1),
|
||||
m_typedUserInfo(0),
|
||||
m_constraintType (type),
|
||||
m_rbA(rbA),
|
||||
m_rbB(rbB),
|
||||
|
||||
@@ -17,6 +17,7 @@ subject to the following restrictions:
|
||||
#define TYPED_CONSTRAINT_H
|
||||
|
||||
class btRigidBody;
|
||||
class btTypedUserInfo;
|
||||
#include "LinearMath/btScalar.h"
|
||||
|
||||
enum btTypedConstraintType
|
||||
@@ -33,7 +34,7 @@ class btTypedConstraint
|
||||
{
|
||||
int m_userConstraintType;
|
||||
int m_userConstraintId;
|
||||
char* m_name;
|
||||
btTypedUserInfo* m_typedUserInfo;
|
||||
|
||||
btTypedConstraintType m_constraintType;
|
||||
|
||||
@@ -109,14 +110,14 @@ public:
|
||||
return m_constraintType;
|
||||
}
|
||||
|
||||
char* getName () const
|
||||
btTypedUserInfo* getTypedUserInfo () const
|
||||
{
|
||||
return m_name;
|
||||
return m_typedUserInfo;
|
||||
}
|
||||
|
||||
void setName (char* name)
|
||||
void setTypedUserInfo (btTypedUserInfo* typedUserInfo)
|
||||
{
|
||||
m_name = name;
|
||||
m_typedUserInfo = typedUserInfo;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user