add support to btHingeConstraint to set/get ERP, example use:

hinge->setParam(BT_CONSTRAINT_ERP,0.5);
btScalar erp = hinge->getParam(BT_CONSTRAINT_ERP);
Also, preliminary support for status bar messages in demo framework.
This commit is contained in:
erwin coumans
2014-10-17 13:05:53 -07:00
parent c0b4871f6c
commit 1baf2e5cc6
4 changed files with 77 additions and 10 deletions

View File

@@ -19,9 +19,12 @@ void ConstraintPhysicsSetup::stepSimulation(float deltaTime)
}
#include "Bullet3Common/b3Logging.h"
void ConstraintPhysicsSetup::initPhysics(GraphicsPhysicsBridge& gfxBridge)
{
b3Printf(__FILE__);
gfxBridge.setUpAxis(1);
createEmptyDynamicsWorld();
@@ -51,6 +54,8 @@ slider.m_maxVal=720;
btVector3 btAxisA( 0.0f, 1.0f, 0.0f ); // pointing upwards, aka Y-axis
spDoorHinge = new btHingeAccumulatedAngleConstraint( *pDoorBody, btPivotA, btAxisA );
spDoorHinge->setParam(BT_CONSTRAINT_ERP,0.5);
btScalar erp = spDoorHinge->getParam(BT_CONSTRAINT_ERP);
// spDoorHinge->setLimit( 0.0f, SIMD_PI_2 );
// test problem values