updated quickstep solver (for comparison), enabled GPU physics again (but WIN32 doesn't have the VertexTextureSupport enabled)
This commit is contained in:
@@ -907,7 +907,12 @@ void help ()
|
||||
|
||||
int main ( int argc, char **argv )
|
||||
{
|
||||
#ifdef WIN32
|
||||
//until there is a first GPU that works under VertexTextureSupport under WIN32, disable it
|
||||
bool disableVertexTextureSupport = true;
|
||||
#else
|
||||
bool disableVertexTextureSupport = false ;
|
||||
#endif
|
||||
debugOpt = DRAW_ALL ;
|
||||
|
||||
for ( int i = 1 ; i < argc ; i++ )
|
||||
|
||||
@@ -54,8 +54,12 @@ class BU_Joint;
|
||||
|
||||
//see below
|
||||
|
||||
//to bridge with ODE quickstep, we make a temp copy of the rigidbodies in each simultion island, stored in an array of size MAX_RIGIDBODIES
|
||||
#define MAX_QUICKSTEP_RIGIDBODIES 8192
|
||||
//to bridge with ODE quickstep, we make a temp copy of the rigidbodies in each simultion island
|
||||
#define ODE_MAX_SOLVER_BODIES 16384
|
||||
#define ODE_MAX_SOLVER_JOINTS 65535
|
||||
static OdeSolverBody gSolverBodyArray[ODE_MAX_SOLVER_BODIES];
|
||||
static ContactJoint gJointArray[ODE_MAX_SOLVER_JOINTS];
|
||||
|
||||
|
||||
OdeConstraintSolver::OdeConstraintSolver():
|
||||
m_cfm(0.f),//1e-5f),
|
||||
@@ -65,10 +69,6 @@ m_erp(0.4f)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//iterative lcp and penalty method
|
||||
float OdeConstraintSolver::solveGroup(btPersistentManifold** manifoldPtr, int numManifolds,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer)
|
||||
{
|
||||
@@ -76,9 +76,9 @@ float OdeConstraintSolver::solveGroup(btPersistentManifold** manifoldPtr, int nu
|
||||
m_CurJoint = 0;
|
||||
|
||||
int numBodies = 0;
|
||||
OdeSolverBody* odeBodies [MAX_QUICKSTEP_RIGIDBODIES];
|
||||
OdeSolverBody* odeBodies [ODE_MAX_SOLVER_BODIES];
|
||||
int numJoints = 0;
|
||||
BU_Joint* joints [MAX_QUICKSTEP_RIGIDBODIES*4];
|
||||
BU_Joint* joints [ODE_MAX_SOLVER_JOINTS];
|
||||
|
||||
for (int j=0;j<numManifolds;j++)
|
||||
{
|
||||
@@ -138,8 +138,6 @@ void dRfromQ1 (dMatrix3 R, const dQuaternion q)
|
||||
|
||||
}
|
||||
|
||||
#define ODE_MAX_SOLVER_BODIES 16384
|
||||
static OdeSolverBody gSolverBodyArray[ODE_MAX_SOLVER_BODIES];
|
||||
|
||||
|
||||
int OdeConstraintSolver::ConvertBody(btRigidBody* orgBody,OdeSolverBody** bodies,int& numBodies)
|
||||
@@ -208,8 +206,8 @@ int OdeConstraintSolver::ConvertBody(btRigidBody* orgBody,OdeSolverBody** bodies
|
||||
|
||||
|
||||
|
||||
#define ODE_MAX_SOLVER_JOINTS 65535
|
||||
static ContactJoint gJointArray[ODE_MAX_SOLVER_JOINTS];
|
||||
|
||||
|
||||
|
||||
|
||||
void OdeConstraintSolver::ConvertConstraint(btPersistentManifold* manifold,BU_Joint** joints,int& numJoints,
|
||||
|
||||
@@ -186,7 +186,7 @@ void ContactJoint::GetInfo2(Info2 *info)
|
||||
c2[2] = relativePositionB[2];
|
||||
|
||||
//combined friction is available in the contact point
|
||||
float friction = FRICTION_CONSTANT ;//* m_body0->m_friction * m_body1->m_friction;
|
||||
float friction = 0.25;//FRICTION_CONSTANT ;//* m_body0->m_friction * m_body1->m_friction;
|
||||
|
||||
// first friction direction
|
||||
if (m_numRows >= 2)
|
||||
|
||||
@@ -25,10 +25,7 @@
|
||||
|
||||
#ifdef USE_SOR_SOLVER
|
||||
|
||||
// SOR LCP taken from ode quickstep,
|
||||
// todo: write own successive overrelaxation gauss-seidel, or jacobi iterative solver
|
||||
|
||||
|
||||
// SOR LCP taken from ode quickstep, for comparisons to Bullet sequential impulse solver.
|
||||
#include "LinearMath/btScalar.h"
|
||||
|
||||
#include "BulletDynamics/Dynamics/btRigidBody.h"
|
||||
@@ -648,8 +645,8 @@ void SolveInternal1 (float global_cfm,
|
||||
dMULTIPLY2_333 (tmp,body[i]->m_invI,body[i]->m_R);
|
||||
dMULTIPLY0_333 (invI+i*12,body[i]->m_R,tmp);
|
||||
// compute rotational force
|
||||
dMULTIPLY0_331 (tmp,I+i*12,body[i]->m_angularVelocity);
|
||||
dCROSS (body[i]->m_tacc,-=,body[i]->m_angularVelocity,tmp);
|
||||
// dMULTIPLY0_331 (tmp,I+i*12,body[i]->m_angularVelocity);
|
||||
// dCROSS (body[i]->m_tacc,-=,body[i]->m_angularVelocity,tmp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user