Back to index

supertuxkart  0.5+dfsg1
Defines | Functions | Variables
btOdeContactJoint.cpp File Reference
#include "btOdeContactJoint.h"
#include "btOdeSolverBody.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"

Go to the source code of this file.

Defines

#define FRICTION_CONSTANT   120.f
#define dCROSS(a, op, b, c)
#define M_SQRT12   btScalar(0.7071067811865475244008443621048490)
#define dRecipSqrt(x)   ((float)(1.0f/btSqrt(float(x)))) /* reciprocal square root */
#define DO_THE_FRICTION_2

Functions

void dPlaneSpace1 (const dVector3 n, dVector3 p, dVector3 q)

Variables

int m_numRows = 3

Define Documentation

#define dCROSS (   a,
  op,
  b,
 
)
Value:
(a)[0] op ((b)[1]*(c)[2] - (b)[2]*(c)[1]); \
  (a)[1] op ((b)[2]*(c)[0] - (b)[0]*(c)[2]); \
  (a)[2] op ((b)[0]*(c)[1] - (b)[1]*(c)[0]);

Definition at line 44 of file btOdeContactJoint.cpp.

#define dRecipSqrt (   x)    ((float)(1.0f/btSqrt(float(x)))) /* reciprocal square root */

Definition at line 51 of file btOdeContactJoint.cpp.

#define FRICTION_CONSTANT   120.f

Definition at line 21 of file btOdeContactJoint.cpp.

#define M_SQRT12   btScalar(0.7071067811865475244008443621048490)

Definition at line 49 of file btOdeContactJoint.cpp.


Function Documentation

void dPlaneSpace1 ( const dVector3  n,
dVector3  p,
dVector3  q 
)

Definition at line 55 of file btOdeContactJoint.cpp.

{
  if (btFabs(n[2]) > M_SQRT12) {
    // choose p in y-z plane
    btScalar a = n[1]*n[1] + n[2]*n[2];
    btScalar k = dRecipSqrt (a);
    p[0] = 0;
    p[1] = -n[2]*k;
    p[2] = n[1]*k;
    // set q = n x p
    q[0] = a*k;
    q[1] = -n[0]*p[2];
    q[2] = n[0]*p[1];
  }
  else {
    // choose p in x-y plane
    btScalar a = n[0]*n[0] + n[1]*n[1];
    btScalar k = dRecipSqrt (a);
    p[0] = -n[1]*k;
    p[1] = n[0]*k;
    p[2] = 0;
    // set q = n x p
    q[0] = -n[2]*p[1];
    q[1] = n[2]*p[0];
    q[2] = a*k;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int m_numRows = 3

Definition at line 33 of file btOdeContactJoint.cpp.