21 #if defined(DEBUG) || defined(_DEBUG)
25 #include <spu_printf.h>
26 #define printf spu_printf
31 #ifdef BT_USE_DOUBLE_PRECISION
32 #define REL_ERROR2 btScalar(1.0e-12)
35 #define REL_ERROR2 btScalar(1.0e-6)
42 m_penetrationDepthSolver(penetrationDepthSolver),
43 m_simplexSolver(simplexSolver),
44 m_minkowskiA(objectA),
45 m_minkowskiB(objectB),
50 m_ignoreMargin(false),
52 m_catchDegeneracies(1),
53 m_fixContactNormalDirection(1)
58 m_penetrationDepthSolver(penetrationDepthSolver),
59 m_simplexSolver(simplexSolver),
60 m_minkowskiA(objectA),
61 m_minkowskiB(objectB),
62 m_shapeTypeA(shapeTypeA),
63 m_shapeTypeB(shapeTypeB),
66 m_ignoreMargin(false),
68 m_catchDegeneracies(1),
69 m_fixContactNormalDirection(1)
82 btVector3 separatingAxisInA = (dir)*localTransA.getBasis();
83 btVector3 separatingAxisInB = (-dir) * localTransB.getBasis();
85 btVector3 pInANoMargin = convexA->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInA);
86 btVector3 qInBNoMargin = convexB->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInB);
91 supAworld = localTransA(pInA);
92 supBworld = localTransB(qInB);
100 aMinb = supAworld - supBworld;
145 v->m_floats[0] +=
w->m_floats[0];
146 v->m_floats[1] +=
w->m_floats[1];
147 v->m_floats[2] +=
w->m_floats[2];
182 d->m_floats[0] = (
a->m_floats[1] *
b->m_floats[2]) - (
a->m_floats[2] *
b->m_floats[1]);
183 d->m_floats[1] = (
a->m_floats[2] *
b->m_floats[0]) - (
a->m_floats[0] *
b->m_floats[2]);
184 d->m_floats[2] = (
a->m_floats[0] *
b->m_floats[1]) - (
a->m_floats[1] *
b->m_floats[0]);
350 double u,
v,
w, p, q,
r;
351 double s,
t, dist, dist2;
365 s = (q *
r -
w * p) / (
w *
v -
r *
r);
366 t = (-s *
r - q) /
w;
573 int B_on_ACD, C_on_ADB, D_on_ABC;
574 int AB_O, AC_O, AD_O;
630 if (AB_O && AC_O && AD_O)
691 m_cachedSeparatingDistance = 0.f;
699 btVector3 positionOffset = (localTransA.getOrigin() + localTransB.getOrigin()) *
btScalar(0.5);
700 localTransA.getOrigin() -= positionOffset;
701 localTransB.getOrigin() -= positionOffset;
703 bool check2d = m_minkowskiA->isConvex2d() && m_minkowskiB->isConvex2d();
717 int gGjkMaxIter = 1000;
718 m_cachedSeparatingAxis.setValue(0, 1, 0);
720 bool isValid =
false;
721 bool checkSimplex =
false;
722 bool checkPenetration =
true;
723 m_degenerateSimplex = 0;
725 m_lastUsedMethod = -1;
728 btScalar margin = marginA + marginB;
750 btComputeSupport(m_minkowskiA, localTransA, m_minkowskiB, localTransB, dir, check2d, supAworld, supBworld, lastSupV);
762 for (
int iterations = 0; iterations < gGjkMaxIter; iterations++)
765 btComputeSupport(m_minkowskiA, localTransA, m_minkowskiB, localTransB, dir, check2d, supAworld, supBworld, lastSupV);
791 if (do_simplex_res == 1)
796 else if (do_simplex_res == -1)
825 m_simplexSolver->reset();
842 btVector3 separatingAxisInA = (-m_cachedSeparatingAxis) * localTransA.getBasis();
843 btVector3 separatingAxisInB = m_cachedSeparatingAxis * localTransB.getBasis();
845 btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInA);
846 btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInB);
858 delta = m_cachedSeparatingAxis.dot(
w);
861 if ((delta >
btScalar(0.0)) && (delta * delta > squaredDistance *
input.m_maximumDistanceSquared))
863 m_degenerateSimplex = 10;
870 if (m_simplexSolver->inSimplex(
w))
872 m_degenerateSimplex = 1;
877 btScalar f0 = squaredDistance - delta;
884 m_degenerateSimplex = 2;
888 m_degenerateSimplex = 11;
895 m_simplexSolver->addVertex(
w, pWorld, qWorld);
899 if (!m_simplexSolver->closest(newCachedSeparatingAxis))
901 m_degenerateSimplex = 3;
906 if (newCachedSeparatingAxis.length2() <
REL_ERROR2)
908 m_cachedSeparatingAxis = newCachedSeparatingAxis;
909 m_degenerateSimplex = 6;
914 btScalar previousSquaredDistance = squaredDistance;
915 squaredDistance = newCachedSeparatingAxis.length2();
918 if (squaredDistance > previousSquaredDistance)
920 m_degenerateSimplex = 7;
921 squaredDistance = previousSquaredDistance;
922 checkSimplex =
false;
930 if (previousSquaredDistance - squaredDistance <=
SIMD_EPSILON * previousSquaredDistance)
934 m_degenerateSimplex = 12;
939 m_cachedSeparatingAxis = newCachedSeparatingAxis;
942 if (m_curIter++ > gGjkMaxIter)
944 #if defined(DEBUG) || defined(_DEBUG)
946 printf(
"btGjkPairDetector maxIter exceeded:%i\n", m_curIter);
947 printf(
"sepAxis=(%f,%f,%f), squaredDistance = %f, shapeTypeA=%i,shapeTypeB=%i\n",
948 m_cachedSeparatingAxis.getX(),
949 m_cachedSeparatingAxis.getY(),
950 m_cachedSeparatingAxis.getZ(),
952 m_minkowskiA->getShapeType(),
953 m_minkowskiB->getShapeType());
959 bool check = (!m_simplexSolver->fullSimplex());
966 m_degenerateSimplex = 13;
973 m_simplexSolver->compute_points(pointOnA, pointOnB);
974 normalInB = m_cachedSeparatingAxis;
976 btScalar lenSqr = m_cachedSeparatingAxis.length2();
981 m_degenerateSimplex = 5;
991 pointOnA -= m_cachedSeparatingAxis * (marginA / s);
992 pointOnB += m_cachedSeparatingAxis * (marginB / s);
995 orgNormalInB = normalInB;
997 m_lastUsedMethod = 1;
1001 m_lastUsedMethod = 2;
1006 bool catchDegeneratePenetrationCase =
1010 if ((checkPenetration && (!isValid || catchDegeneratePenetrationCase)) || (status == 0))
1015 if (m_penetrationDepthSolver)
1020 m_cachedSeparatingAxis.setZero();
1022 bool isValid2 = m_penetrationDepthSolver->calcPenDepth(
1024 m_minkowskiA, m_minkowskiB,
1025 localTransA, localTransB,
1026 m_cachedSeparatingAxis, tmpPointOnA, tmpPointOnB,
1029 if (m_cachedSeparatingAxis.length2())
1033 btVector3 tmpNormalInB = tmpPointOnB - tmpPointOnA;
1034 btScalar lenSqr = tmpNormalInB.length2();
1037 tmpNormalInB = m_cachedSeparatingAxis;
1038 lenSqr = m_cachedSeparatingAxis.length2();
1043 tmpNormalInB /=
btSqrt(lenSqr);
1045 m_lastUsedMethod = 3;
1050 pointOnA = tmpPointOnA;
1051 pointOnB = tmpPointOnB;
1052 normalInB = tmpNormalInB;
1057 m_lastUsedMethod = 8;
1062 m_lastUsedMethod = 9;
1074 if (m_cachedSeparatingAxis.length2() >
btScalar(0.))
1081 pointOnA = tmpPointOnA;
1082 pointOnB = tmpPointOnB;
1083 pointOnA -= m_cachedSeparatingAxis * marginA;
1084 pointOnB += m_cachedSeparatingAxis * marginB;
1085 normalInB = m_cachedSeparatingAxis;
1086 normalInB.normalize();
1089 m_lastUsedMethod = 6;
1093 m_lastUsedMethod = 5;
1108 m_cachedSeparatingAxis = normalInB;
1109 m_cachedSeparatingDistance =
distance;
1119 btVector3 separatingAxisInA = (-orgNormalInB) * localTransA.getBasis();
1120 btVector3 separatingAxisInB = orgNormalInB * localTransB.getBasis();
1122 btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInA);
1123 btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInB);
1128 d2 = orgNormalInB.dot(
w) - margin;
1133 btVector3 separatingAxisInA = (normalInB)*localTransA.getBasis();
1134 btVector3 separatingAxisInB = -normalInB * localTransB.getBasis();
1136 btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInA);
1137 btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInB);
1142 d1 = (-normalInB).
dot(
w) - margin;
1146 btVector3 separatingAxisInA = (-normalInB) *
input.m_transformA.getBasis();
1147 btVector3 separatingAxisInB = normalInB *
input.m_transformB.getBasis();
1149 btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInA);
1150 btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(separatingAxisInB);
1155 d0 = normalInB.dot(
w) - margin;
1160 m_lastUsedMethod = 10;
1164 if (orgNormalInB.length2())
1166 if (d2 > d0 && d2 > d1 && d2 >
distance)
1168 normalInB = orgNormalInB;
1176 pointOnB + positionOffset,
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual btScalar getMargin() const =0
btConvexShape()
not supported on IBM SDK, until we fix the alignment of btVector3
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
btScalar btVec3PointTriDist2(const btVector3 *P, const btVector3 *x0, const btVector3 *B, const btVector3 *C, btVector3 *witness)
static btVector3 ccd_vec3_origin(0, 0, 0)
int btVec3Eq(const btVector3 *a, const btVector3 *b)
int btSimplexSize(const btSimplex *s)
static void btComputeSupport(const btConvexShape *convexA, const btTransform &localTransA, const btConvexShape *convexB, const btTransform &localTransB, const btVector3 &dir, bool check2d, btVector3 &supAworld, btVector3 &supBworld, btVector3 &aMinb)
void ccdVec3Sub(btVector3 *v, const btVector3 *w)
btScalar ccdVec3X(const btVector3 *v)
void btSupportCopy(btSupportVector *d, const btSupportVector *s)
void btSimplexSet(btSimplex *s, size_t pos, const btSupportVector *a)
btScalar btVec3PointSegmentDist2(const btVector3 *P, const btVector3 *x0, const btVector3 *b, btVector3 *witness)
btScalar gGjkEpaPenetrationTolerance
void btVec3Copy(btVector3 *v, const btVector3 *w)
void btVec3Sub2(btVector3 *d, const btVector3 *v, const btVector3 *w)
void btVec3Cross(btVector3 *d, const btVector3 *a, const btVector3 *b)
btScalar btVec3Dot(const btVector3 *a, const btVector3 *b)
void btSimplexInit(btSimplex *s)
void btTripleCross(const btVector3 *a, const btVector3 *b, const btVector3 *c, btVector3 *d)
btScalar ccdVec3Z(const btVector3 *v)
void btVec3Scale(btVector3 *d, btScalar k)
const btSupportVector * btSimplexPoint(const btSimplex *s, int idx)
void btSimplexAdd(btSimplex *s, const btSupportVector *v)
static int btDoSimplex4(btSimplex *simplex, btVector3 *dir)
void ccdVec3Add(btVector3 *v, const btVector3 *w)
static int btDoSimplex3(btSimplex *simplex, btVector3 *dir)
const btSupportVector * ccdSimplexLast(const btSimplex *s)
btScalar ccdVec3Y(const btVector3 *v)
int ccdSign(btScalar val)
btScalar ccdVec3Dist2(const btVector3 *a, const btVector3 *b)
void btSimplexSetSize(btSimplex *s, int size)
static int btDoSimplex(btSimplex *simplex, btVector3 *dir)
static int btDoSimplex2(btSimplex *simplex, btVector3 *dir)
int ccdEq(btScalar _a, btScalar _b)
void debugDraw(btIDebugDraw *debugDrawer)
btActionInterface interface
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
SIMD_FORCE_INLINE bool btFuzzyZero(btScalar x)
SIMD_FORCE_INLINE btScalar btSqrt(btScalar y)
#define btSimplexSolverInterface
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
SIMD_FORCE_INLINE btScalar distance2(const btVector3 &v) const
Return the distance squared between the ends of this and another vector This is symantically treating...
ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
virtual void getClosestPoints(const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)
btGjkPairDetector(const btConvexShape *objectA, const btConvexShape *objectB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver)
void getClosestPointsNonVirtual(const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw)
SyclQueue void void size_t num_bytes void
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
T length(const vec_base< T, Size > &a)
T distance(const T &a, const T &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
int last
index of last added point
btVector3 v2
Support point in obj2.
btVector3 v1
Support point in obj1.
btVector3 v
Support point in minkowski sum.
BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z)