fix indexing bug in deformable sleeping
This commit is contained in:
@@ -103,6 +103,7 @@ void btDeformableBackwardEulerObjective::applyForce(TVStack& force, bool setZero
|
|||||||
btSoftBody* psb = m_softBodies[i];
|
btSoftBody* psb = m_softBodies[i];
|
||||||
if (!psb->isActive())
|
if (!psb->isActive())
|
||||||
{
|
{
|
||||||
|
counter += psb->m_nodes.size();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ void btDeformableBodySolver::updateVelocity()
|
|||||||
psb->m_maxSpeedSquared = 0;
|
psb->m_maxSpeedSquared = 0;
|
||||||
if (!psb->isActive())
|
if (!psb->isActive())
|
||||||
{
|
{
|
||||||
|
counter += psb->m_nodes.size();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
||||||
@@ -275,6 +276,7 @@ void btDeformableBodySolver::updateTempPosition()
|
|||||||
btSoftBody* psb = m_softBodies[i];
|
btSoftBody* psb = m_softBodies[i];
|
||||||
if (!psb->isActive())
|
if (!psb->isActive())
|
||||||
{
|
{
|
||||||
|
counter += psb->m_nodes.size();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
||||||
@@ -307,6 +309,7 @@ void btDeformableBodySolver::setupDeformableSolve(bool implicit)
|
|||||||
btSoftBody* psb = m_softBodies[i];
|
btSoftBody* psb = m_softBodies[i];
|
||||||
if (!psb->isActive())
|
if (!psb->isActive())
|
||||||
{
|
{
|
||||||
|
counter += psb->m_nodes.size();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
for (int j = 0; j < psb->m_nodes.size(); ++j)
|
||||||
|
|||||||
Reference in New Issue
Block a user