Add soft body anchor 'm_influence' to control the solver.
Thanks to Gregory Jaegy, see Issue 502 Avoid using btTransform to update btSoftBody (bounds are already in worldspace) Use btConvexHullComputer for soft body cluster debug rendering Fix soft body demo issue of invisible soft bodies (rendering was not enabled properly)
This commit is contained in:
@@ -1484,8 +1484,20 @@ void SoftDemo::renderme()
|
||||
btIDebugDraw* idraw=m_dynamicsWorld->getDebugDrawer();
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_LIGHTING);
|
||||
m_dynamicsWorld->debugDrawWorld();
|
||||
|
||||
btSoftRigidDynamicsWorld* softWorld = (btSoftRigidDynamicsWorld*)m_dynamicsWorld;
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
/* Bodies */
|
||||
btVector3 ps(0,0,0);
|
||||
int nps=0;
|
||||
|
||||
Reference in New Issue
Block a user