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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user