Back to index

supertuxkart  0.5+dfsg1
Classes | Defines | Functions
btTransformUtil.h File Reference
#include "btTransform.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  btTransformUtil
 Utils related to temporal transforms. More...

Defines

#define ANGULAR_MOTION_THRESHOLD   btScalar(0.5)*SIMD_HALF_PI
#define SIMDSQRT12   btScalar(0.7071067811865475244008443621048490)
#define btRecipSqrt(x)   ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */

Functions

SIMD_FORCE_INLINE btVector3 btAabbSupport (const btVector3 &halfExtents, const btVector3 &supportDir)
SIMD_FORCE_INLINE void btPlaneSpace1 (const btVector3 &n, btVector3 &p, btVector3 &q)

Define Documentation

Definition at line 20 of file btTransformUtil.h.

#define btRecipSqrt (   x)    ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */

Definition at line 26 of file btTransformUtil.h.

#define SIMDSQRT12   btScalar(0.7071067811865475244008443621048490)

Definition at line 24 of file btTransformUtil.h.


Function Documentation

SIMD_FORCE_INLINE btVector3 btAabbSupport ( const btVector3 halfExtents,
const btVector3 supportDir 
)

Definition at line 28 of file btTransformUtil.h.

{
       return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(),
      supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(),
      supportDir.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); 
}

Here is the call graph for this function:

SIMD_FORCE_INLINE void btPlaneSpace1 ( const btVector3 n,
btVector3 p,
btVector3 q 
)

Definition at line 36 of file btTransformUtil.h.

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

Here is the call graph for this function:

Here is the caller graph for this function: