33 #define CATCH_DEGENERATE_TETRAHEDRON 1
247 for (i = 0; i < numverts; i++)
276 for (i = 0; i < numverts; i++)
278 #ifdef BT_USE_EQUAL_VERTEX_THRESHOLD
315 result.m_usedVertices.reset();
325 result.m_closestPointOnSimplex =
a;
326 result.m_usedVertices.usedVertexA =
true;
327 result.setBarycentricCoordinates(1, 0, 0);
335 if (d3 >=
btScalar(0.0) && d4 <= d3)
337 result.m_closestPointOnSimplex =
b;
338 result.m_usedVertices.usedVertexB =
true;
339 result.setBarycentricCoordinates(0, 1, 0);
348 result.m_closestPointOnSimplex =
a +
v * ab;
349 result.m_usedVertices.usedVertexA =
true;
350 result.m_usedVertices.usedVertexB =
true;
351 result.setBarycentricCoordinates(1 -
v,
v, 0);
360 if (d6 >=
btScalar(0.0) && d5 <= d6)
362 result.m_closestPointOnSimplex =
c;
363 result.m_usedVertices.usedVertexC =
true;
364 result.setBarycentricCoordinates(0, 0, 1);
373 result.m_closestPointOnSimplex =
a +
w * ac;
374 result.m_usedVertices.usedVertexA =
true;
375 result.m_usedVertices.usedVertexC =
true;
376 result.setBarycentricCoordinates(1 -
w, 0,
w);
385 btScalar w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
387 result.m_closestPointOnSimplex =
b +
w * (
c -
b);
388 result.m_usedVertices.usedVertexB =
true;
389 result.m_usedVertices.usedVertexC =
true;
390 result.setBarycentricCoordinates(0, 1 -
w,
w);
400 result.m_closestPointOnSimplex =
a + ab *
v + ac *
w;
401 result.m_usedVertices.usedVertexA =
true;
402 result.m_usedVertices.usedVertexB =
true;
403 result.m_usedVertices.usedVertexC =
true;
404 result.setBarycentricCoordinates(1 -
v -
w,
v,
w);
418 #ifdef CATCH_DEGENERATE_TETRAHEDRON
419 #ifdef BT_USE_DOUBLE_PRECISION
434 return signp * signd <
btScalar(0.);
454 if (pointOutsideABC < 0 || pointOutsideACD < 0 || pointOutsideADB < 0 || pointOutsideBDC < 0)
460 if (!pointOutsideABC && !pointOutsideACD && !pointOutsideADB && !pointOutsideBDC)
474 if (sqDist < bestSqDist)
499 if (sqDist < bestSqDist)
524 if (sqDist < bestSqDist)
548 if (sqDist < bestSqDist)
_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
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...
void addVertex(const btVector3 &pt)
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...
void reduceVertices(const btUsageBitfield &usedVerts)
int getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const
bool closestPtPointTetrahedron(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &d, btSubSimplexClosestResult &finalResult)
bool inSimplex(const btVector3 &w)
bool emptySimplex() const
bool m_cachedValidClosest
int pointOutsideOfPlane(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &d)
Test if point p and d lie on opposite sides of plane through abc.
btVector3 m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS]
btSubSimplexClosestResult m_cachedBC
void compute_points(btVector3 &p1, btVector3 &p2)
bool updateClosestVectorAndPoints()
bool closestPtPointTriangle(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, btSubSimplexClosestResult &result)
bool closest(btVector3 &v)
btVector3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS]
btVector3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS]
void removeVertex(int index)
void backup_closest(btVector3 &v)
btScalar m_equalVertexThreshold
IconTextureDrawCall normal
ccl_gpu_kernel_postfix ccl_global float int int int int float bool reset
clear internal cached data and reset random seed
IMETHOD Vector diff(const Vector &a, const Vector &b, double dt=1)
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
vec_base< T, 3 > cross(const vec_base< T, 3 > &a, const vec_base< T, 3 > &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void setBarycentricCoordinates(btScalar a=btScalar(0.), btScalar b=btScalar(0.), btScalar c=btScalar(0.), btScalar d=btScalar(0.))
btUsageBitfield m_usedVertices
btScalar m_barycentricCoords[4]
btVector3 m_closestPointOnSimplex
unsigned short usedVertexC
unsigned short usedVertexB
unsigned short usedVertexA
unsigned short usedVertexD