Added slider constraint class btSliderConstraint
This commit is contained in:
@@ -17,6 +17,7 @@ subject to the following restrictions:
|
|||||||
#define TYPED_CONSTRAINT_H
|
#define TYPED_CONSTRAINT_H
|
||||||
|
|
||||||
class btRigidBody;
|
class btRigidBody;
|
||||||
|
class btTypedUserInfo;
|
||||||
#include "LinearMath/btScalar.h"
|
#include "LinearMath/btScalar.h"
|
||||||
|
|
||||||
enum btTypedConstraintType
|
enum btTypedConstraintType
|
||||||
@@ -25,7 +26,8 @@ enum btTypedConstraintType
|
|||||||
HINGE_CONSTRAINT_TYPE,
|
HINGE_CONSTRAINT_TYPE,
|
||||||
CONETWIST_CONSTRAINT_TYPE,
|
CONETWIST_CONSTRAINT_TYPE,
|
||||||
D6_CONSTRAINT_TYPE,
|
D6_CONSTRAINT_TYPE,
|
||||||
VEHICLE_CONSTRAINT_TYPE
|
VEHICLE_CONSTRAINT_TYPE,
|
||||||
|
SLIDER_CONSTRAINT_TYPE,
|
||||||
};
|
};
|
||||||
|
|
||||||
///TypedConstraint is the baseclass for Bullet constraints and vehicles
|
///TypedConstraint is the baseclass for Bullet constraints and vehicles
|
||||||
@@ -33,6 +35,7 @@ class btTypedConstraint
|
|||||||
{
|
{
|
||||||
int m_userConstraintType;
|
int m_userConstraintType;
|
||||||
int m_userConstraintId;
|
int m_userConstraintId;
|
||||||
|
btTypedUserInfo* m_typedUserInfo;
|
||||||
|
|
||||||
btTypedConstraintType m_constraintType;
|
btTypedConstraintType m_constraintType;
|
||||||
|
|
||||||
@@ -98,13 +101,6 @@ public:
|
|||||||
{
|
{
|
||||||
return m_userConstraintId;
|
return m_userConstraintId;
|
||||||
}
|
}
|
||||||
|
|
||||||
///unique id is needed by the btHashMap during serialization
|
|
||||||
int getUid() const
|
|
||||||
{
|
|
||||||
return m_userConstraintId;
|
|
||||||
}
|
|
||||||
|
|
||||||
btScalar getAppliedImpulse() const
|
btScalar getAppliedImpulse() const
|
||||||
{
|
{
|
||||||
return m_appliedImpulse;
|
return m_appliedImpulse;
|
||||||
@@ -115,6 +111,15 @@ public:
|
|||||||
return m_constraintType;
|
return m_constraintType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btTypedUserInfo* getTypedUserInfo () const
|
||||||
|
{
|
||||||
|
return m_typedUserInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTypedUserInfo (btTypedUserInfo* typedUserInfo)
|
||||||
|
{
|
||||||
|
m_typedUserInfo = typedUserInfo;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //TYPED_CONSTRAINT_H
|
#endif //TYPED_CONSTRAINT_H
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ subject to the following restrictions:
|
|||||||
#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
|
#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
|
||||||
#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
|
#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
|
||||||
#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
|
#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
|
||||||
|
#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
|
||||||
|
|
||||||
#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
|
#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
|
||||||
///Optional ODE quickstep constraint solver, redistributed under ZLib license
|
///Optional ODE quickstep constraint solver, redistributed under ZLib license
|
||||||
|
|||||||
Reference in New Issue
Block a user