Blender
V3.3
|
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface More...
#include <btGjkPairDetector.h>
Public Attributes | |
int | m_lastUsedMethod |
int | m_curIter |
int | m_degenerateSimplex |
int | m_catchDegeneracies |
int | m_fixContactNormalDirection |
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
Definition at line 27 of file btGjkPairDetector.h.
btGjkPairDetector::btGjkPairDetector | ( | const btConvexShape * | objectA, |
const btConvexShape * | objectB, | ||
btSimplexSolverInterface * | simplexSolver, | ||
btConvexPenetrationDepthSolver * | penetrationDepthSolver | ||
) |
Definition at line 40 of file btGjkPairDetector.cpp.
btGjkPairDetector::btGjkPairDetector | ( | const btConvexShape * | objectA, |
const btConvexShape * | objectB, | ||
int | shapeTypeA, | ||
int | shapeTypeB, | ||
btScalar | marginA, | ||
btScalar | marginB, | ||
btSimplexSolverInterface * | simplexSolver, | ||
btConvexPenetrationDepthSolver * | penetrationDepthSolver | ||
) |
Definition at line 56 of file btGjkPairDetector.cpp.
|
inlinevirtual |
Definition at line 52 of file btGjkPairDetector.h.
|
inline |
Definition at line 72 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision().
|
inline |
Definition at line 76 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision().
|
virtual |
Implements btDiscreteCollisionDetectorInterface.
Definition at line 73 of file btGjkPairDetector.cpp.
References debugDraw(), getClosestPointsNonVirtual(), input, output, and void.
Referenced by btMinkowskiPenetrationDepthSolver::calcPenDepth(), btGjkConvexCast::calcTimeOfImpact(), btConvex2dConvex2dAlgorithm::processCollision(), and btConvexConvexAlgorithm::processCollision().
void btGjkPairDetector::getClosestPointsNonVirtual | ( | const ClosestPointInput & | input, |
Result & | output, | ||
class btIDebugDraw * | debugDraw | ||
) |
this is another degenerate case, where the initial GJK calculation reports a degenerate case EPA reports no penetration, and the second GJK (using the supporting vector without margin) reports a valid positive distance. Use the results of the second GJK instead of failing. thanks to Jacob.Langford for the reproduction case http://code.google.com/p/bullet/issues/detail?id=250
todo: need to track down this EPA penetration solver degeneracy the penetration solver reports penetration but the contact normal connecting the contact points is pointing in the opposite direction until then, detect the issue and revert the normal
Definition at line 688 of file btGjkPairDetector.cpp.
References BT_LARGE_FLOAT, btAssert, btComputeSupport(), btDoSimplex(), btFuzzyZero(), btSimplexAdd(), btSimplexInit(), btSqrt(), btTransform, btVec3Dot(), btVector3, debugDraw(), blender::math::distance(), distance2(), blender::math::dot(), gGjkEpaPenetrationTolerance, input, blender::math::length(), output, REL_ERROR2, SIMD_EPSILON, btSupportVector::v, btSupportVector::v1, btSupportVector::v2, and w().
Referenced by getClosestPoints().
Definition at line 67 of file btGjkPairDetector.h.
Referenced by btMinkowskiPenetrationDepthSolver::calcPenDepth().
don't use setIgnoreMargin, it's for Bullet's internal use
Definition at line 87 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision().
|
inline |
Definition at line 58 of file btGjkPairDetector.h.
Referenced by btConvex2dConvex2dAlgorithm::processCollision(), and btConvexConvexAlgorithm::processCollision().
|
inline |
Definition at line 63 of file btGjkPairDetector.h.
Referenced by btConvex2dConvex2dAlgorithm::processCollision(), and btConvexConvexAlgorithm::processCollision().
|
inline |
Definition at line 81 of file btGjkPairDetector.h.
int btGjkPairDetector::m_catchDegeneracies |
Definition at line 47 of file btGjkPairDetector.h.
int btGjkPairDetector::m_curIter |
Definition at line 45 of file btGjkPairDetector.h.
int btGjkPairDetector::m_degenerateSimplex |
Definition at line 46 of file btGjkPairDetector.h.
int btGjkPairDetector::m_fixContactNormalDirection |
Definition at line 48 of file btGjkPairDetector.h.
int btGjkPairDetector::m_lastUsedMethod |
Definition at line 44 of file btGjkPairDetector.h.