only call buildIslands once for multibody in each timestep
This commit is contained in:
@@ -128,3 +128,11 @@ void btDeformableBackwardEulerObjective::initialGuess(TVStack& dv, const TVStack
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//set constraints as projections
|
||||
void btDeformableBackwardEulerObjective::setConstraints()
|
||||
{
|
||||
// build islands for multibody solve
|
||||
m_world->btMultiBodyDynamicsWorld::buildIslands();
|
||||
projection.setConstraints();
|
||||
}
|
||||
|
||||
@@ -73,10 +73,7 @@ public:
|
||||
void updateVelocity(const TVStack& dv);
|
||||
|
||||
//set constraints as projections
|
||||
void setConstraints()
|
||||
{
|
||||
projection.setConstraints();
|
||||
}
|
||||
void setConstraints();
|
||||
|
||||
// update the projections and project the residual
|
||||
void project(TVStack& r)
|
||||
|
||||
@@ -31,7 +31,7 @@ void btDeformableBodySolver::solveConstraints(float solverdt)
|
||||
backupVelocity();
|
||||
|
||||
m_objective->computeResidual(solverdt, m_residual);
|
||||
// m_objective->initialGuess(m_dv, m_residual);
|
||||
|
||||
computeStep(m_dv, m_residual);
|
||||
updateVelocity();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user