fix double precision, and remove alloca

increase mass of the load, to show benefits of direct MLCP solver
move damping back to original location
This commit is contained in:
erwin.coumans@gmail.com
2013-10-24 18:31:27 +00:00
parent 5ca137cb54
commit 19f999ac08
6 changed files with 88 additions and 83 deletions

View File

@@ -51,10 +51,26 @@ to be implemented. the first `nub' variables are assumed to have findex < 0.
#include "LinearMath/btScalar.h"
#include "LinearMath/btAlignedObjectArray.h"
struct btDantzigScratchMemory
{
btAlignedObjectArray<btScalar> m_scratch;
btAlignedObjectArray<btScalar> L;
btAlignedObjectArray<btScalar> d;
btAlignedObjectArray<btScalar> delta_w;
btAlignedObjectArray<btScalar> delta_x;
btAlignedObjectArray<btScalar> Dell;
btAlignedObjectArray<btScalar> ell;
btAlignedObjectArray<btScalar*> Arows;
btAlignedObjectArray<int> p;
btAlignedObjectArray<int> C;
btAlignedObjectArray<bool> state;
};
//return false if solving failed
bool btSolveDantzigLCP (int n, btScalar *A, btScalar *x, btScalar *b, btScalar *w,
int nub, btScalar *lo, btScalar *hi, int *findex);
int nub, btScalar *lo, btScalar *hi, int *findex,btDantzigScratchMemory& scratch);