Added slider constraint class btSliderConstraint
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,47 +1,48 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef BULLET_DYNAMICS_COMMON_H
|
||||
#define BULLET_DYNAMICS_COMMON_H
|
||||
|
||||
///Common headerfile includes for Bullet Dynamics, including Collision Detection
|
||||
#include "btBulletCollisionCommon.h"
|
||||
|
||||
#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
|
||||
#include "BulletDynamics/Dynamics/btContinuousDynamicsWorld.h"
|
||||
|
||||
#include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h"
|
||||
#include "BulletDynamics/Dynamics/btRigidBody.h"
|
||||
|
||||
#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h"
|
||||
#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
|
||||
#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
|
||||
#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
|
||||
|
||||
#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
|
||||
///Optional ODE quickstep constraint solver, redistributed under ZLib license
|
||||
#include "BulletDynamics/ConstraintSolver/btOdeQuickstepConstraintSolver.h"
|
||||
#include "BulletDynamics/ConstraintSolver/btOdeTypedJoint.h"
|
||||
|
||||
///Vehicle simulation, with wheel contact simulated by raycasts
|
||||
#include "BulletDynamics/Vehicle/btRaycastVehicle.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //BULLET_DYNAMICS_COMMON_H
|
||||
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef BULLET_DYNAMICS_COMMON_H
|
||||
#define BULLET_DYNAMICS_COMMON_H
|
||||
|
||||
///Common headerfile includes for Bullet Dynamics, including Collision Detection
|
||||
#include "btBulletCollisionCommon.h"
|
||||
|
||||
#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
|
||||
#include "BulletDynamics/Dynamics/btContinuousDynamicsWorld.h"
|
||||
|
||||
#include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h"
|
||||
#include "BulletDynamics/Dynamics/btRigidBody.h"
|
||||
|
||||
#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h"
|
||||
#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
|
||||
#include "BulletDynamics/ConstraintSolver/btOdeQuickstepConstraintSolver.h"
|
||||
#include "BulletDynamics/ConstraintSolver/btOdeTypedJoint.h"
|
||||
|
||||
///Vehicle simulation, with wheel contact simulated by raycasts
|
||||
#include "BulletDynamics/Vehicle/btRaycastVehicle.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //BULLET_DYNAMICS_COMMON_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user