Deformables: enable double sided rendering, reduced the number of debug lines in regular rendering.

This commit is contained in:
Erwin Coumans
2019-11-12 20:08:49 -08:00
parent b25d806b14
commit 9ca957387f
15 changed files with 108 additions and 41 deletions

View File

@@ -378,6 +378,22 @@ void btDeformableMultiBodyDynamicsWorld::reinitialize(btScalar timeStep)
btMultiBodyDynamicsWorld::getSolverInfo().m_timeStep = timeStep;
}
void btDeformableMultiBodyDynamicsWorld::debugDrawWorld()
{
for (int i = 0; i < getSoftBodyArray().size(); i++)
{
btSoftBody* psb = (btSoftBody*)getSoftBodyArray()[i];
{
btSoftBodyHelpers::DrawFrame(psb, getDebugDrawer());
btSoftBodyHelpers::Draw(psb, getDebugDrawer(), getDrawFlags());
}
}
btMultiBodyDynamicsWorld::debugDrawWorld();
}
void btDeformableMultiBodyDynamicsWorld::applyRigidBodyGravity(btScalar timeStep)
{
// Gravity is applied in stepSimulation and then cleared here and then applied here and then cleared here again