fix scope override in btMultiBody and scalar type inconsistency in btDeformableBodySolver
This commit is contained in:
@@ -1707,9 +1707,9 @@ void btMultiBody::predictPositionsMultiDof(btScalar dt)
|
||||
{
|
||||
//reset to current pos
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
pJointPos[i] = m_links[i].m_jointPos[i];
|
||||
pJointPos[j] = m_links[i].m_jointPos[j];
|
||||
}
|
||||
|
||||
btVector3 jointVel;
|
||||
@@ -1725,9 +1725,9 @@ void btMultiBody::predictPositionsMultiDof(btScalar dt)
|
||||
}
|
||||
case btMultibodyLink::ePlanar:
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
pJointPos[i] = m_links[i].m_jointPos[i];
|
||||
pJointPos[j] = m_links[i].m_jointPos[j];
|
||||
}
|
||||
pJointPos[0] += dt * getJointVelMultiDof(i)[0];
|
||||
|
||||
|
||||
@@ -30,14 +30,9 @@ btDeformableBodySolver::~btDeformableBodySolver()
|
||||
delete m_objective;
|
||||
}
|
||||
|
||||
void btDeformableBodySolver::solveDeformableConstraints(float solverdt)
|
||||
void btDeformableBodySolver::solveDeformableConstraints(btScalar solverdt)
|
||||
{
|
||||
BT_PROFILE("solveConstraints");
|
||||
// save v_{n+1}^* velocity after explicit forces
|
||||
// backupVelocity();
|
||||
|
||||
// add constraints to the solver
|
||||
// setConstraints();
|
||||
m_objective->computeResidual(solverdt, m_residual);
|
||||
m_objective->applyDynamicFriction(m_residual);
|
||||
computeStep(m_dv, m_residual);
|
||||
@@ -147,7 +142,7 @@ bool btDeformableBodySolver::updateNodes()
|
||||
}
|
||||
|
||||
|
||||
void btDeformableBodySolver::predictMotion(float solverdt)
|
||||
void btDeformableBodySolver::predictMotion(btScalar solverdt)
|
||||
{
|
||||
for (int i = 0; i < m_softBodySet.size(); ++i)
|
||||
{
|
||||
|
||||
@@ -196,6 +196,7 @@ void btDeformableMultiBodyDynamicsWorld::solveMultiBodyConstraints()
|
||||
btMultiBodyDynamicsWorld::processConstraintsAndDeltaVee();
|
||||
m_deformableBodySolver->solveContactConstraints();
|
||||
}
|
||||
// todo @xuchenhan: add joint force feedback
|
||||
}
|
||||
|
||||
void btDeformableMultiBodyDynamicsWorld::addSoftBody(btSoftBody* body, int collisionFilterGroup, int collisionFilterMask)
|
||||
|
||||
Reference in New Issue
Block a user