expose btMultiBodyConstraint applied impulse (force) on its degree of freedom(s),

only tested for btMultiBodyJointMotor for now.
See also MultiBody/MultiBodyConstraintFeedback example
This commit is contained in:
=
2015-07-06 23:00:46 -07:00
parent 33b0d429ba
commit 3431773800
10 changed files with 50 additions and 11 deletions

View File

@@ -6,7 +6,7 @@
#include "../CommonInterfaces/CommonMultiBodyBase.h"
btScalar radius(0.2);
static btScalar radius(0.2);
struct TestJointTorqueSetup : public CommonMultiBodyBase
{
@@ -48,10 +48,16 @@ TestJointTorqueSetup::~TestJointTorqueSetup()
///this is a temporary global, until we determine if we need the option or not
extern bool gJointFeedbackInWorldSpace;
extern bool gJointFeedbackInJointFrame;
void TestJointTorqueSetup::initPhysics()
{
int upAxis = 1;
gJointFeedbackInWorldSpace = true;
gJointFeedbackInJointFrame = true;
m_guiHelper->setUpAxis(upAxis);
btVector4 colors[4] =
@@ -417,4 +423,4 @@ void TestJointTorqueSetup::stepSimulation(float deltaTime)
class CommonExampleInterface* TestJointTorqueCreateFunc(struct CommonExampleOptions& options)
{
return new TestJointTorqueSetup(options.m_guiHelper);
}
}