Bullet Collision Detection & Physics Library
Macros | Typedefs | Functions
btBoxBoxDetector.cpp File Reference
#include "btBoxBoxDetector.h"
#include "BulletCollision/CollisionShapes/btBoxShape.h"
#include <float.h>
#include <string.h>
Include dependency graph for btBoxBoxDetector.cpp:

Go to the source code of this file.

Macros

#define dDOTpq(a, b, p, q)   ((a)[0]*(b)[0] + (a)[p]*(b)[q] + (a)[2*(p)]*(b)[2*(q)])
 
#define dInfinity   FLT_MAX
 
#define dMULTIPLYOP1_331(A, op, B, C)
 
#define dMULTIPLYOP0_331(A, op, B, C)
 
#define dMULTIPLY1_331(A, B, C)   dMULTIPLYOP1_331(A,=,B,C)
 
#define dMULTIPLY0_331(A, B, C)   dMULTIPLYOP0_331(A,=,B,C)
 
#define M__PI   3.14159265f
 
#define TST(expr1, expr2, norm, cc)
 
#define TST(expr1, expr2, n1, n2, n3, cc)
 

Typedefs

typedef btScalar dMatrix3[4 *3]
 

Functions

static btScalar dDOT (const btScalar *a, const btScalar *b)
 
static btScalar dDOT44 (const btScalar *a, const btScalar *b)
 
static btScalar dDOT41 (const btScalar *a, const btScalar *b)
 
static btScalar dDOT14 (const btScalar *a, const btScalar *b)
 
void dLineClosestApproach (const btVector3 &pa, const btVector3 &ua, const btVector3 &pb, const btVector3 &ub, btScalar *alpha, btScalar *beta)
 
static int intersectRectQuad2 (btScalar h[2], btScalar p[8], btScalar ret[16])
 
void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[])
 
int dBoxBox2 (const btVector3 &p1, const dMatrix3 R1, const btVector3 &side1, const btVector3 &p2, const dMatrix3 R2, const btVector3 &side2, btVector3 &normal, btScalar *depth, int *return_code, int maxc, dContactGeom *, int, btDiscreteCollisionDetectorInterface::Result &output)
 

Macro Definition Documentation

#define dDOTpq (   a,
  b,
  p,
 
)    ((a)[0]*(b)[0] + (a)[p]*(b)[q] + (a)[2*(p)]*(b)[2*(q)])

Definition at line 51 of file btBoxBoxDetector.cpp.

#define dInfinity   FLT_MAX

Definition at line 52 of file btBoxBoxDetector.cpp.

#define dMULTIPLY0_331 (   A,
  B,
 
)    dMULTIPLYOP0_331(A,=,B,C)

Definition at line 79 of file btBoxBoxDetector.cpp.

#define dMULTIPLY1_331 (   A,
  B,
 
)    dMULTIPLYOP1_331(A,=,B,C)

Definition at line 78 of file btBoxBoxDetector.cpp.

#define dMULTIPLYOP0_331 (   A,
  op,
  B,
 
)
Value:
{ \
(A)[0] op dDOT((B),(C)); \
(A)[1] op dDOT((B+4),(C)); \
(A)[2] op dDOT((B+8),(C)); \
}
static btScalar dDOT(const btScalar *a, const btScalar *b)

Definition at line 71 of file btBoxBoxDetector.cpp.

#define dMULTIPLYOP1_331 (   A,
  op,
  B,
 
)
Value:
{\
(A)[0] op dDOT41((B),(C)); \
(A)[1] op dDOT41((B+1),(C)); \
(A)[2] op dDOT41((B+2),(C)); \
}
static btScalar dDOT41(const btScalar *a, const btScalar *b)

Definition at line 64 of file btBoxBoxDetector.cpp.

#define M__PI   3.14159265f

Definition at line 174 of file btBoxBoxDetector.cpp.

#define TST (   expr1,
  expr2,
  norm,
  cc 
)
Value:
s2 = btFabs(expr1) - (expr2); \
if (s2 > 0) return 0; \
if (s2 > s) { \
s = s2; \
normalR = norm; \
invert_normal = ((expr1) < 0); \
code = (cc); \
}
btScalar btFabs(btScalar x)
Definition: btScalar.h:449
#define TST (   expr1,
  expr2,
  n1,
  n2,
  n3,
  cc 
)
Value:
s2 = btFabs(expr1) - (expr2); \
if (s2 > SIMD_EPSILON) return 0; \
l = btSqrt((n1)*(n1) + (n2)*(n2) + (n3)*(n3)); \
if (l > SIMD_EPSILON) { \
s2 /= l; \
if (s2*fudge_factor > s) { \
s = s2; \
normalR = 0; \
normalC[0] = (n1)/l; normalC[1] = (n2)/l; normalC[2] = (n3)/l; \
invert_normal = ((expr1) < 0); \
code = (cc); \
} \
}
#define SIMD_EPSILON
Definition: btScalar.h:494
btScalar btSqrt(btScalar y)
Definition: btScalar.h:418
btScalar btFabs(btScalar x)
Definition: btScalar.h:449

Typedef Documentation

typedef btScalar dMatrix3[4 *3]

Definition at line 81 of file btBoxBoxDetector.cpp.

Function Documentation

void cullPoints2 ( int  n,
btScalar  p[],
int  m,
int  i0,
int  iret[] 
)

Definition at line 185 of file btBoxBoxDetector.cpp.

int dBoxBox2 ( const btVector3 p1,
const dMatrix3  R1,
const btVector3 side1,
const btVector3 p2,
const dMatrix3  R2,
const btVector3 side2,
btVector3 normal,
btScalar depth,
int *  return_code,
int  maxc,
dContactGeom *  ,
int  ,
btDiscreteCollisionDetectorInterface::Result output 
)

Definition at line 262 of file btBoxBoxDetector.cpp.

static btScalar dDOT ( const btScalar a,
const btScalar b 
)
static

Definition at line 60 of file btBoxBoxDetector.cpp.

static btScalar dDOT14 ( const btScalar a,
const btScalar b 
)
static

Definition at line 63 of file btBoxBoxDetector.cpp.

static btScalar dDOT41 ( const btScalar a,
const btScalar b 
)
static

Definition at line 62 of file btBoxBoxDetector.cpp.

static btScalar dDOT44 ( const btScalar a,
const btScalar b 
)
static

Definition at line 61 of file btBoxBoxDetector.cpp.

void dLineClosestApproach ( const btVector3 pa,
const btVector3 ua,
const btVector3 pb,
const btVector3 ub,
btScalar alpha,
btScalar beta 
)

Definition at line 86 of file btBoxBoxDetector.cpp.

static int intersectRectQuad2 ( btScalar  h[2],
btScalar  p[8],
btScalar  ret[16] 
)
static

Definition at line 120 of file btBoxBoxDetector.cpp.