Back to index

supertuxkart  0.5+dfsg1
Defines | Functions
btSorLcp.cpp File Reference
#include "btSorLcp.h"
#include "btOdeSolverBody.h"
#include "LinearMath/btScalar.h"
#include "BulletDynamics/Dynamics/btRigidBody.h"
#include <math.h>
#include <float.h>
#include <string.h>
#include <stdio.h>
#include <alloca.h>
#include "btOdeJoint.h"
#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
#include "btOdeMacros.h"

Go to the source code of this file.

Defines

#define RANDOMLY_REORDER_CONSTRAINTS   1

Functions

void compute_invM_JT (int m, dRealMutablePtr J, dRealMutablePtr iMJ, int *jb, const btAlignedObjectArray< btOdeSolverBody * > &body, dRealPtr invI)
void multiply_J (int m, dRealMutablePtr J, int *jb, dRealMutablePtr in, dRealMutablePtr out)
 ATTRIBUTE_ALIGNED16 (struct) IndexError

Define Documentation

Definition at line 67 of file btSorLcp.cpp.


Function Documentation

ATTRIBUTE_ALIGNED16 ( struct  )

Definition at line 211 of file btSorLcp.cpp.

                                       {
       btScalar error;             // error to sort on
       int findex;
       int index;           // row index
};
void compute_invM_JT ( int  m,
dRealMutablePtr  J,
dRealMutablePtr  iMJ,
int *  jb,
const btAlignedObjectArray< btOdeSolverBody * > &  body,
dRealPtr  invI 
) [inline]

Definition at line 72 of file btSorLcp.cpp.

{
       int i,j;
       dRealMutablePtr iMJ_ptr = iMJ;
       dRealMutablePtr J_ptr = J;
       for (i=0; i<m; i++) {
              int b1 = jb[i*2];
              int b2 = jb[i*2+1];
              btScalar k = body[b1]->m_invMass;
              for (j=0; j<3; j++) iMJ_ptr[j] = k*J_ptr[j];
              dMULTIPLY0_331 (iMJ_ptr + 3, invI + 12*b1, J_ptr + 3);
              if (b2 >= 0) {
                     k = body[b2]->m_invMass;
                     for (j=0; j<3; j++) iMJ_ptr[j+6] = k*J_ptr[j+6];
                     dMULTIPLY0_331 (iMJ_ptr + 9, invI + 12*b2, J_ptr + 9);
              }
              J_ptr += 12;
              iMJ_ptr += 12;
       }
}

Here is the caller graph for this function:

void multiply_J ( int  m,
dRealMutablePtr  J,
int *  jb,
dRealMutablePtr  in,
dRealMutablePtr  out 
) [inline]

Definition at line 176 of file btSorLcp.cpp.

{
       int i,j;
       dRealPtr J_ptr = J;
       for (i=0; i<m; i++) {
              int b1 = jb[i*2];
              int b2 = jb[i*2+1];
              btScalar sum = 0;
              dRealMutablePtr in_ptr = in + b1*6;
              for (j=0; j<6; j++) sum += J_ptr[j] * in_ptr[j];
              J_ptr += 6;
              if (b2 >= 0) {
                     in_ptr = in + b2*6;
                     for (j=0; j<6; j++) sum += J_ptr[j] * in_ptr[j];
              }
              J_ptr += 6;
              out[i] = sum;
       }
}

Here is the caller graph for this function: