add option to set stress clamping limit

This commit is contained in:
Xuchen Han
2019-10-12 18:48:56 -07:00
parent 9e29f7108d
commit a7222d8a9f
4 changed files with 49 additions and 62 deletions

View File

@@ -90,6 +90,7 @@ void btSoftBody::initDefaults()
m_cfg.diterations = 0;
m_cfg.citerations = 4;
m_cfg.drag = 0;
m_cfg.m_maxStress = 0;
m_cfg.collisions = fCollision::Default;
m_cfg.collisions |= fCollision::VF_DD;
m_pose.m_bvolume = false;
@@ -3195,6 +3196,12 @@ void btSoftBody::applyForces()
}
}
//
void btSoftBody::setMaxStress(btScalar maxStress)
{
m_cfg.m_maxStress = maxStress;
}
//
void btSoftBody::interpolateRenderMesh()
{