| Bullet Collision Detection & Physics Library
    | 
 
 
 
Go to the documentation of this file.
   33 #define CATCH_DEGENERATE_TETRAHEDRON 1 
  141                                 nearest = from + t * v;
 
  247         for (i = 0; i < numverts; i++)
 
  276         for (i = 0; i < numverts; i++)
 
  278 #ifdef BT_USE_EQUAL_VERTEX_THRESHOLD 
  335         if (d3 >= 
btScalar(0.0) && d4 <= d3)
 
  360         if (d6 >= 
btScalar(0.0) && d5 <= d6)
 
  385                 btScalar w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
 
  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)
 
  
btScalar m_barycentricCoords[4]
unsigned short usedVertexA
void backup_closest(btVector3 &v)
btVector3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS]
btScalar dot(const btQuaternion &q1, const btQuaternion &q2)
Calculate the dot product between two quaternions.
unsigned short usedVertexB
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
bool emptySimplex() const
void setBarycentricCoordinates(btScalar a=btScalar(0.), btScalar b=btScalar(0.), btScalar c=btScalar(0.), btScalar d=btScalar(0.))
unsigned short usedVertexD
btScalar dot(const btVector3 &v) const
Return the dot product.
void reduceVertices(const btUsageBitfield &usedVerts)
bool inSimplex(const btVector3 &w)
bool updateClosestVectorAndPoints()
int getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const
btScalar m_equalVertexThreshold
btVector3 m_closestPointOnSimplex
bool m_cachedValidClosest
btUsageBitfield m_usedVertices
bool closestPtPointTriangle(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, btSubSimplexClosestResult &result)
btVector3 can be used to represent 3D points and vectors.
void addVertex(const btVector3 &w, const btVector3 &p, const btVector3 &q)
btSubSimplexClosestResult m_cachedBC
bool closestPtPointTetrahedron(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &d, btSubSimplexClosestResult &finalResult)
void compute_points(btVector3 &p1, btVector3 &p2)
void removeVertex(int index)
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]
unsigned short usedVertexC
bool closest(btVector3 &v)
btScalar length2() const
Return the length of the vector squared.
btVector3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS]