Applied patch/contribution to improve btGeneric6DofConstraint. See also GenericJointDemo/Ragdoll.cpp

Thanks Francisco Leon/projectileman.
This commit is contained in:
ejcoumans
2007-09-13 07:22:40 +00:00
parent 7a117ca7ac
commit 0300e8fa12
4 changed files with 869 additions and 448 deletions

View File

@@ -15,6 +15,7 @@ subject to the following restrictions:
#include "btBulletDynamicsCommon.h"
#include "LinearMath/btIDebugDraw.h"
@@ -25,7 +26,6 @@ subject to the following restrictions:
#include "ConstraintDemo.h"
#include "GL_ShapeDrawer.h"
#include "GlutStuff.h"
const int numObjects = 3;
@@ -150,8 +150,9 @@ void ConstraintDemo::initPhysics()
btTransform frameInA, frameInB;
frameInA = btTransform::getIdentity();
frameInB = btTransform::getIdentity();
btGeneric6DofConstraint* slider = new btGeneric6DofConstraint(*d6body0,*fixedBody1,frameInA,frameInB);
bool useLinearReferenceFrameA = false;//use fixed frame B for linear limits
btGeneric6DofConstraint* slider = new btGeneric6DofConstraint(*d6body0,*fixedBody1,frameInA,frameInB,useLinearReferenceFrameA);
slider->setLinearLowerLimit(lowerSliderLimit);
slider->setLinearUpperLimit(hiSliderLimit);