Bullet Collision Detection & Physics Library
Classes | Macros | Typedefs | Functions
btMprPenetration.h File Reference
#include "LinearMath/btTransform.h"
#include "LinearMath/btAlignedObjectArray.h"
Include dependency graph for btMprPenetration.h:

Go to the source code of this file.

Classes

struct  btMprCollisionDescription
 
struct  btMprDistanceInfo
 
struct  _btMprSupport_t
 
struct  _btMprSimplex_t
 

Macros

#define BT_DEBUG_MPR1
 2014 Oct, Erwin Coumans, Use templates to avoid void* casts More...
 
#define BT_MPR_SQRT   sqrt
 
#define BT_MPR_FMIN(x, y)   ((x) < (y) ? (x) : (y))
 
#define BT_MPR_FABS   fabs
 
#define BT_MPR_TOLERANCE   1E-6f
 
#define BT_MPR_MAX_ITERATIONS   1000
 

Typedefs

typedef struct _btMprSupport_t btMprSupport_t
 
typedef struct _btMprSimplex_t btMprSimplex_t
 

Functions

btMprSupport_tbtMprSimplexPointW (btMprSimplex_t *s, int idx)
 
void btMprSimplexSetSize (btMprSimplex_t *s, int size)
 
int btMprSimplexSize (const btMprSimplex_t *s)
 
const btMprSupport_tbtMprSimplexPoint (const btMprSimplex_t *s, int idx)
 
void btMprSupportCopy (btMprSupport_t *d, const btMprSupport_t *s)
 
void btMprSimplexSet (btMprSimplex_t *s, size_t pos, const btMprSupport_t *a)
 
void btMprSimplexSwap (btMprSimplex_t *s, size_t pos1, size_t pos2)
 
int btMprIsZero (float val)
 
int btMprEq (float _a, float _b)
 
int btMprVec3Eq (const btVector3 *a, const btVector3 *b)
 
template<typename btConvexTemplate >
void btFindOrigin (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, btMprSupport_t *center)
 
void btMprVec3Set (btVector3 *v, float x, float y, float z)
 
void btMprVec3Add (btVector3 *v, const btVector3 *w)
 
void btMprVec3Copy (btVector3 *v, const btVector3 *w)
 
void btMprVec3Scale (btVector3 *d, float k)
 
float btMprVec3Dot (const btVector3 *a, const btVector3 *b)
 
float btMprVec3Len2 (const btVector3 *v)
 
void btMprVec3Normalize (btVector3 *d)
 
void btMprVec3Cross (btVector3 *d, const btVector3 *a, const btVector3 *b)
 
void btMprVec3Sub2 (btVector3 *d, const btVector3 *v, const btVector3 *w)
 
void btPortalDir (const btMprSimplex_t *portal, btVector3 *dir)
 
int portalEncapsulesOrigin (const btMprSimplex_t *portal, const btVector3 *dir)
 
int portalReachTolerance (const btMprSimplex_t *portal, const btMprSupport_t *v4, const btVector3 *dir)
 
int portalCanEncapsuleOrigin (const btMprSimplex_t *portal, const btMprSupport_t *v4, const btVector3 *dir)
 
void btExpandPortal (btMprSimplex_t *portal, const btMprSupport_t *v4)
 
template<typename btConvexTemplate >
void btMprSupport (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, const btVector3 &dir, btMprSupport_t *supp)
 
template<typename btConvexTemplate >
static int btDiscoverPortal (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, btMprSimplex_t *portal)
 
template<typename btConvexTemplate >
static int btRefinePortal (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, btMprSimplex_t *portal)
 
static void btFindPos (const btMprSimplex_t *portal, btVector3 *pos)
 
float btMprVec3Dist2 (const btVector3 *a, const btVector3 *b)
 
float _btMprVec3PointSegmentDist2 (const btVector3 *P, const btVector3 *x0, const btVector3 *b, btVector3 *witness)
 
float btMprVec3PointTriDist2 (const btVector3 *P, const btVector3 *x0, const btVector3 *B, const btVector3 *C, btVector3 *witness)
 
template<typename btConvexTemplate >
static void btFindPenetr (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, btMprSimplex_t *portal, float *depth, btVector3 *pdir, btVector3 *pos)
 
static void btFindPenetrTouch (btMprSimplex_t *portal, float *depth, btVector3 *dir, btVector3 *pos)
 
static void btFindPenetrSegment (btMprSimplex_t *portal, float *depth, btVector3 *dir, btVector3 *pos)
 
template<typename btConvexTemplate >
int btMprPenetration (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, float *depthOut, btVector3 *dirOut, btVector3 *posOut)
 
template<typename btConvexTemplate , typename btMprDistanceTemplate >
int btComputeMprPenetration (const btConvexTemplate &a, const btConvexTemplate &b, const btMprCollisionDescription &colDesc, btMprDistanceTemplate *distInfo)
 

Macro Definition Documentation

◆ BT_DEBUG_MPR1

#define BT_DEBUG_MPR1

2014 Oct, Erwin Coumans, Use templates to avoid void* casts

Definition at line 24 of file btMprPenetration.h.

◆ BT_MPR_FABS

#define BT_MPR_FABS   fabs

Definition at line 64 of file btMprPenetration.h.

◆ BT_MPR_FMIN

#define BT_MPR_FMIN (   x,
 
)    ((x) < (y) ? (x) : (y))

Definition at line 63 of file btMprPenetration.h.

◆ BT_MPR_MAX_ITERATIONS

#define BT_MPR_MAX_ITERATIONS   1000

Definition at line 67 of file btMprPenetration.h.

◆ BT_MPR_SQRT

#define BT_MPR_SQRT   sqrt

Definition at line 61 of file btMprPenetration.h.

◆ BT_MPR_TOLERANCE

#define BT_MPR_TOLERANCE   1E-6f

Definition at line 66 of file btMprPenetration.h.

Typedef Documentation

◆ btMprSimplex_t

Definition at line 82 of file btMprPenetration.h.

◆ btMprSupport_t

Definition at line 75 of file btMprPenetration.h.

Function Documentation

◆ _btMprVec3PointSegmentDist2()

float _btMprVec3PointSegmentDist2 ( const btVector3 P,
const btVector3 x0,
const btVector3 b,
btVector3 witness 
)
inline

Definition at line 577 of file btMprPenetration.h.

◆ btComputeMprPenetration()

template<typename btConvexTemplate , typename btMprDistanceTemplate >
int btComputeMprPenetration ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
btMprDistanceTemplate *  distInfo 
)
inline

Definition at line 866 of file btMprPenetration.h.

◆ btDiscoverPortal()

template<typename btConvexTemplate >
static int btDiscoverPortal ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
btMprSimplex_t portal 
)
static

Definition at line 324 of file btMprPenetration.h.

◆ btExpandPortal()

void btExpandPortal ( btMprSimplex_t portal,
const btMprSupport_t v4 
)
inline

Definition at line 274 of file btMprPenetration.h.

◆ btFindOrigin()

template<typename btConvexTemplate >
void btFindOrigin ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
btMprSupport_t center 
)
inline

Definition at line 165 of file btMprPenetration.h.

◆ btFindPenetr()

template<typename btConvexTemplate >
static void btFindPenetr ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
btMprSimplex_t portal,
float *  depth,
btVector3 pdir,
btVector3 pos 
)
static

Definition at line 730 of file btMprPenetration.h.

◆ btFindPenetrSegment()

static void btFindPenetrSegment ( btMprSimplex_t portal,
float *  depth,
btVector3 dir,
btVector3 pos 
)
static

Definition at line 793 of file btMprPenetration.h.

◆ btFindPenetrTouch()

static void btFindPenetrTouch ( btMprSimplex_t portal,
float *  depth,
btVector3 dir,
btVector3 pos 
)
static

Definition at line 775 of file btMprPenetration.h.

◆ btFindPos()

static void btFindPos ( const btMprSimplex_t portal,
btVector3 pos 
)
static

Definition at line 497 of file btMprPenetration.h.

◆ btMprEq()

int btMprEq ( float  _a,
float  _b 
)
inline

Definition at line 138 of file btMprPenetration.h.

◆ btMprIsZero()

int btMprIsZero ( float  val)
inline

Definition at line 133 of file btMprPenetration.h.

◆ btMprPenetration()

template<typename btConvexTemplate >
int btMprPenetration ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
float *  depthOut,
btVector3 dirOut,
btVector3 posOut 
)
inline

Definition at line 813 of file btMprPenetration.h.

◆ btMprSimplexPoint()

const btMprSupport_t * btMprSimplexPoint ( const btMprSimplex_t s,
int  idx 
)
inline

Definition at line 108 of file btMprPenetration.h.

◆ btMprSimplexPointW()

btMprSupport_t * btMprSimplexPointW ( btMprSimplex_t s,
int  idx 
)
inline

Definition at line 84 of file btMprPenetration.h.

◆ btMprSimplexSet()

void btMprSimplexSet ( btMprSimplex_t s,
size_t  pos,
const btMprSupport_t a 
)
inline

Definition at line 119 of file btMprPenetration.h.

◆ btMprSimplexSetSize()

void btMprSimplexSetSize ( btMprSimplex_t s,
int  size 
)
inline

Definition at line 89 of file btMprPenetration.h.

◆ btMprSimplexSize()

int btMprSimplexSize ( const btMprSimplex_t s)
inline

Definition at line 103 of file btMprPenetration.h.

◆ btMprSimplexSwap()

void btMprSimplexSwap ( btMprSimplex_t s,
size_t  pos1,
size_t  pos2 
)
inline

Definition at line 124 of file btMprPenetration.h.

◆ btMprSupport()

template<typename btConvexTemplate >
void btMprSupport ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
const btVector3 dir,
btMprSupport_t supp 
)
inline

Definition at line 308 of file btMprPenetration.h.

◆ btMprSupportCopy()

void btMprSupportCopy ( btMprSupport_t d,
const btMprSupport_t s 
)
inline

Definition at line 114 of file btMprPenetration.h.

◆ btMprVec3Add()

void btMprVec3Add ( btVector3 v,
const btVector3 w 
)
inline

Definition at line 177 of file btMprPenetration.h.

◆ btMprVec3Copy()

void btMprVec3Copy ( btVector3 v,
const btVector3 w 
)
inline

Definition at line 182 of file btMprPenetration.h.

◆ btMprVec3Cross()

void btMprVec3Cross ( btVector3 d,
const btVector3 a,
const btVector3 b 
)
inline

Definition at line 211 of file btMprPenetration.h.

◆ btMprVec3Dist2()

float btMprVec3Dist2 ( const btVector3 a,
const btVector3 b 
)
inline

Definition at line 570 of file btMprPenetration.h.

◆ btMprVec3Dot()

float btMprVec3Dot ( const btVector3 a,
const btVector3 b 
)
inline

Definition at line 192 of file btMprPenetration.h.

◆ btMprVec3Eq()

int btMprVec3Eq ( const btVector3 a,
const btVector3 b 
)
inline

Definition at line 159 of file btMprPenetration.h.

◆ btMprVec3Len2()

float btMprVec3Len2 ( const btVector3 v)
inline

Definition at line 200 of file btMprPenetration.h.

◆ btMprVec3Normalize()

void btMprVec3Normalize ( btVector3 d)
inline

Definition at line 205 of file btMprPenetration.h.

◆ btMprVec3PointTriDist2()

float btMprVec3PointTriDist2 ( const btVector3 P,
const btVector3 x0,
const btVector3 B,
const btVector3 C,
btVector3 witness 
)
inline

Definition at line 642 of file btMprPenetration.h.

◆ btMprVec3Scale()

void btMprVec3Scale ( btVector3 d,
float  k 
)
inline

Definition at line 187 of file btMprPenetration.h.

◆ btMprVec3Set()

void btMprVec3Set ( btVector3 v,
float  x,
float  y,
float  z 
)
inline

Definition at line 172 of file btMprPenetration.h.

◆ btMprVec3Sub2()

void btMprVec3Sub2 ( btVector3 d,
const btVector3 v,
const btVector3 w 
)
inline

Definition at line 216 of file btMprPenetration.h.

◆ btPortalDir()

void btPortalDir ( const btMprSimplex_t portal,
btVector3 dir 
)
inline

Definition at line 221 of file btMprPenetration.h.

◆ btRefinePortal()

template<typename btConvexTemplate >
static int btRefinePortal ( const btConvexTemplate &  a,
const btConvexTemplate &  b,
const btMprCollisionDescription colDesc,
btMprSimplex_t portal 
)
static

Definition at line 461 of file btMprPenetration.h.

◆ portalCanEncapsuleOrigin()

int portalCanEncapsuleOrigin ( const btMprSimplex_t portal,
const btMprSupport_t v4,
const btVector3 dir 
)
inline

Definition at line 265 of file btMprPenetration.h.

◆ portalEncapsulesOrigin()

int portalEncapsulesOrigin ( const btMprSimplex_t portal,
const btVector3 dir 
)
inline

Definition at line 233 of file btMprPenetration.h.

◆ portalReachTolerance()

int portalReachTolerance ( const btMprSimplex_t portal,
const btMprSupport_t v4,
const btVector3 dir 
)
inline

Definition at line 241 of file btMprPenetration.h.