more example browser tweaks, mostly related to (debug) rendering

This commit is contained in:
erwincoumans
2015-05-02 11:40:06 -07:00
parent 01d14f538a
commit 551709a74b
8 changed files with 107 additions and 44 deletions

View File

@@ -160,6 +160,22 @@ public:
{
return m_guiHelper;
}
virtual void renderScene()
{
CommonRigidBodyBase::renderScene();
btSoftRigidDynamicsWorld* softWorld = getSoftDynamicsWorld();
for ( int i=0;i<softWorld->getSoftBodyArray().size();i++)
{
btSoftBody* psb=(btSoftBody*)softWorld->getSoftBodyArray()[i];
if (softWorld->getDebugDrawer() && !(softWorld->getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe)))
{
btSoftBodyHelpers::DrawFrame(psb,softWorld->getDebugDrawer());
btSoftBodyHelpers::Draw(psb,softWorld->getDebugDrawer(),softWorld->getDrawFlags());
}
}
}
};