Improved URDF support for btMultiBody and separate graphics/collision/inertial frames and shapes

Fix WinXP GetTickCount64 with a typedef
Expose debug drawing mode/flags in UI (hot keys A,D,L,W for now, buttons later)
GLInstancingRenderer: tweak near/far planes to allow closer approach of camera
btDiscreteDynamicsWorld: enable debug drawing for btGeneric6DofSpring2Constraint
btMultiBodyDynamicsWorld: enable basic debug drawing for btMultiBody
btMultibody: allow center-of-mass shift for prismatic and fixed constraint
This commit is contained in:
erwincoumans
2015-01-22 17:56:24 -08:00
parent 6e70f285e1
commit a159fbac69
28 changed files with 1022 additions and 674 deletions

View File

@@ -89,7 +89,7 @@ public:
}
}
virtual void physicsDebugDraw()
virtual void physicsDebugDraw(int debugDrawFlags)
{
btVector3 xUnit(1,0,0);

View File

@@ -74,7 +74,7 @@ public:
m_app->m_renderer->renderScene();
}
virtual void physicsDebugDraw()
virtual void physicsDebugDraw(int debugDrawFlags)
{
int width=3;
btVector3 from(0,0,0);

View File

@@ -612,10 +612,11 @@ void FeatherstoneDemo1::renderScene()
m_glApp->m_renderer->renderScene();
}
void FeatherstoneDemo1::physicsDebugDraw()
void FeatherstoneDemo1::physicsDebugDraw(int debugDrawFlags)
{
if (m_dynamicsWorld)
{
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugDrawFlags);
m_dynamicsWorld->debugDrawWorld();
}
}

View File

@@ -89,7 +89,7 @@ public:
virtual void initPhysics();
virtual void exitPhysics();
virtual void renderScene();
virtual void physicsDebugDraw();
virtual void physicsDebugDraw(int debugDrawFlags);
virtual void stepSimulation(float deltaTime);
};

View File

@@ -413,10 +413,16 @@ void LuaPhysicsSetup::stepSimulation(float deltaTime)
}
void LuaPhysicsSetup::debugDraw()
void LuaPhysicsSetup::debugDraw(int debugDrawFlags)
{
if (m_dynamicsWorld)
{
if (m_dynamicsWorld->getDebugDrawer())
{
m_dynamicsWorld->getDebugDrawer()->setDebugMode(debugDrawFlags);
}
m_dynamicsWorld->debugDrawWorld();
}
}

View File

@@ -25,7 +25,7 @@ struct LuaPhysicsSetup : public CommonPhysicsSetup
virtual void stepSimulation(float deltaTime);
virtual void debugDraw();
virtual void debugDraw(int debugDrawFlags);
virtual bool pickBody(const btVector3& rayFromWorld, const btVector3& rayToWorld);
virtual bool movePickedBody(const btVector3& rayFromWorld, const btVector3& rayToWorld);