fix bug introduced in clearing m_manifold; 7e37d3fd21069571adb4c1e4ffacbd71dd02c0ba

This commit is contained in:
Xuchen Han 2019-08-12 12:06:55 -07:00
parent 081497a812
commit cfbd6c512a

View File

@ -375,15 +375,10 @@ struct MultiBodyInplaceSolverIslandCallback : public btSimulationIslandManager::
m_islandAnalyticsData.push_back(m_solver->m_analyticsData); m_islandAnalyticsData.push_back(m_solver->m_analyticsData);
} }
m_bodies.resize(0); m_bodies.resize(0);
// m_manifolds.resize(0); m_manifolds.resize(0);
m_constraints.resize(0); m_constraints.resize(0);
m_multiBodyConstraints.resize(0); m_multiBodyConstraints.resize(0);
} }
void clearContactConstraints()
{
m_manifolds.resize(0);
}
}; };
void btMultiBodyDynamicsWorld::getAnalyticsData(btAlignedObjectArray<btSolverAnalyticsData>& islandAnalyticsData) const void btMultiBodyDynamicsWorld::getAnalyticsData(btAlignedObjectArray<btSolverAnalyticsData>& islandAnalyticsData) const
@ -435,7 +430,6 @@ void btMultiBodyDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo)
solveExternalForces(solverInfo); solveExternalForces(solverInfo);
buildIslands(); buildIslands();
solveInternalConstraints(solverInfo); solveInternalConstraints(solverInfo);
m_solverMultiBodyIslandCallback->clearContactConstraints();
} }
void btMultiBodyDynamicsWorld::buildIslands() void btMultiBodyDynamicsWorld::buildIslands()