Deformables: enable double sided rendering, reduced the number of debug lines in regular rendering.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -93,7 +93,9 @@ public:
|
||||
}
|
||||
|
||||
virtual int stepSimulation(btScalar timeStep, int maxSubSteps = 1, btScalar fixedTimeStep = btScalar(1.) / btScalar(60.));
|
||||
|
||||
|
||||
virtual void debugDrawWorld();
|
||||
|
||||
void setSolverCallback(btSolverCallback cb)
|
||||
{
|
||||
m_solverCallback = cb;
|
||||
@@ -178,6 +180,7 @@ public:
|
||||
{
|
||||
m_lineSearch = lineSearch;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //BT_DEFORMABLE_MULTIBODY_DYNAMICS_WORLD_H
|
||||
|
||||
Reference in New Issue
Block a user