Added slider constraint class btSliderConstraint

This commit is contained in:
rponom
2008-04-05 01:06:01 +00:00
parent 883d3278ec
commit 849780ba64
2 changed files with 61 additions and 55 deletions

View File

@@ -17,6 +17,7 @@ subject to the following restrictions:
#define TYPED_CONSTRAINT_H
class btRigidBody;
class btTypedUserInfo;
#include "LinearMath/btScalar.h"
enum btTypedConstraintType
@@ -25,7 +26,8 @@ enum btTypedConstraintType
HINGE_CONSTRAINT_TYPE,
CONETWIST_CONSTRAINT_TYPE,
D6_CONSTRAINT_TYPE,
VEHICLE_CONSTRAINT_TYPE
VEHICLE_CONSTRAINT_TYPE,
SLIDER_CONSTRAINT_TYPE,
};
///TypedConstraint is the baseclass for Bullet constraints and vehicles
@@ -33,6 +35,7 @@ class btTypedConstraint
{
int m_userConstraintType;
int m_userConstraintId;
btTypedUserInfo* m_typedUserInfo;
btTypedConstraintType m_constraintType;
@@ -98,13 +101,6 @@ public:
{
return m_userConstraintId;
}
///unique id is needed by the btHashMap during serialization
int getUid() const
{
return m_userConstraintId;
}
btScalar getAppliedImpulse() const
{
return m_appliedImpulse;
@@ -115,6 +111,15 @@ public:
return m_constraintType;
}
btTypedUserInfo* getTypedUserInfo () const
{
return m_typedUserInfo;
}
void setTypedUserInfo (btTypedUserInfo* typedUserInfo)
{
m_typedUserInfo = typedUserInfo;
}
};
#endif //TYPED_CONSTRAINT_H

View File

@@ -29,6 +29,7 @@ subject to the following restrictions:
#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
///Optional ODE quickstep constraint solver, redistributed under ZLib license