Added Dantzig MLCP solver option from Open Dynamics Engine (trying to avoid naming/linking conflicts in case ODE and Bullet is used together)

If an MLCP solver fails, use PGS/SI fallback, add a boolean return value for 'solve' method
This commit is contained in:
erwin.coumans@gmail.com
2013-10-21 23:27:09 +00:00
parent 1ca0493dc4
commit 379f0079e0
10 changed files with 2322 additions and 56 deletions

View File

@@ -131,46 +131,10 @@ struct btMatrixX
{
if (m_storage[col+row*m_cols]==0.f)
{
m_rowNonZeroElements1[row].push_back(col);
m_colNonZeroElements[col].push_back(row);
/*
//we need to keep the m_rowNonZeroElements1/m_colNonZeroElements arrays sorted (it is too slow, so commented out)
int f=0;
int l=0;
m_rowNonZeroElements1[row].findBinarySearch(col,&f,&l);
// btAssert(f==l);
if (f<m_rowNonZeroElements1[row].size()-1)
{
m_rowNonZeroElements1[row].expandNonInitializing();
for (int j=m_rowNonZeroElements1[row].size()-1;j>f;j--)
m_rowNonZeroElements1[row][j] = m_rowNonZeroElements1[row][j-1];
m_rowNonZeroElements1[row][f] = col;
} else
{
m_rowNonZeroElements1[row].push_back(col);
}
m_colNonZeroElements[col].findBinarySearch(row,&f,&l);
// btAssert(f==l);
if (f<m_colNonZeroElements[col].size()-1)
{
m_colNonZeroElements[col].expandNonInitializing();
for (int j=m_colNonZeroElements[col].size()-1;j>f;j++)
m_colNonZeroElements[col][j-1] = m_colNonZeroElements[col][j];
m_colNonZeroElements[col][f] = row;
} else
{
m_colNonZeroElements[col].push_back(row);
}
*/
m_storage[row*m_cols+col] = val;
} else
{
}
m_storage[row*m_cols+col] = val;
}
}
const T& operator() (int row,int col) const