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:
@@ -89,7 +89,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void physicsDebugDraw()
|
||||
virtual void physicsDebugDraw(int debugDrawFlags)
|
||||
{
|
||||
|
||||
btVector3 xUnit(1,0,0);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user