Blender V2.61 - r43446
|
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface More...
#include <btGjkPairDetector.h>
Public Member Functions | |
btGjkPairDetector (const btConvexShape *objectA, const btConvexShape *objectB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver) | |
btGjkPairDetector (const btConvexShape *objectA, const btConvexShape *objectB, int shapeTypeA, int shapeTypeB, btScalar marginA, btScalar marginB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver) | |
virtual | ~btGjkPairDetector () |
virtual void | getClosestPoints (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false) |
void | getClosestPointsNonVirtual (const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw) |
void | setMinkowskiA (btConvexShape *minkA) |
void | setMinkowskiB (btConvexShape *minkB) |
void | setCachedSeperatingAxis (const btVector3 &seperatingAxis) |
const btVector3 & | getCachedSeparatingAxis () const |
btScalar | getCachedSeparatingDistance () const |
void | setPenetrationDepthSolver (btConvexPenetrationDepthSolver *penetrationDepthSolver) |
void | setIgnoreMargin (bool ignoreMargin) |
don't use setIgnoreMargin, it's for Bullet's internal use | |
Public Attributes | |
int | m_lastUsedMethod |
int | m_curIter |
int | m_degenerateSimplex |
int | m_catchDegeneracies |
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
Definition at line 30 of file btGjkPairDetector.h.
btGjkPairDetector::btGjkPairDetector | ( | const btConvexShape * | objectA, |
const btConvexShape * | objectB, | ||
btSimplexSolverInterface * | simplexSolver, | ||
btConvexPenetrationDepthSolver * | penetrationDepthSolver | ||
) |
Definition at line 41 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.
virtual btGjkPairDetector::~btGjkPairDetector | ( | ) | [inline, virtual] |
Definition at line 59 of file btGjkPairDetector.h.
const btVector3& btGjkPairDetector::getCachedSeparatingAxis | ( | ) | const [inline] |
Definition at line 80 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision().
btScalar btGjkPairDetector::getCachedSeparatingDistance | ( | ) | const [inline] |
Definition at line 84 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision().
void btGjkPairDetector::getClosestPoints | ( | const ClosestPointInput & | input, |
Result & | output, | ||
class btIDebugDraw * | debugDraw, | ||
bool | swapResults = false |
||
) | [virtual] |
Implements btDiscreteCollisionDetectorInterface.
Definition at line 72 of file btGjkPairDetector.cpp.
References getClosestPointsNonVirtual().
Referenced by btMinkowskiPenetrationDepthSolver::calcPenDepth(), btContinuousConvexCollision::calcTimeOfImpact(), btGjkConvexCast::calcTimeOfImpact(), plNearestPoints(), btConvexConvexAlgorithm::processCollision(), and btConvex2dConvex2dAlgorithm::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
Definition at line 82 of file btGjkPairDetector.cpp.
References btDiscreteCollisionDetectorInterface::Result::addContactPoint(), BT_LARGE_FLOAT, btAssert, btSqrt(), distance(), btTransform::getBasis(), btTransform::getOrigin(), gNumDeepPenetrationChecks, gNumGjkChecks, length(), btDiscreteCollisionDetectorInterface::ClosestPointInput::m_maximumDistanceSquared, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_stackAlloc, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_transformA, btDiscreteCollisionDetectorInterface::ClosestPointInput::m_transformB, REL_ERROR2, SIMD_EPSILON, and simple_enum_gen::w.
Referenced by getClosestPoints().
void btGjkPairDetector::setCachedSeperatingAxis | ( | const btVector3 & | seperatingAxis | ) | [inline] |
Definition at line 75 of file btGjkPairDetector.h.
Referenced by btMinkowskiPenetrationDepthSolver::calcPenDepth().
void btGjkPairDetector::setIgnoreMargin | ( | bool | ignoreMargin | ) | [inline] |
don't use setIgnoreMargin, it's for Bullet's internal use
Definition at line 95 of file btGjkPairDetector.h.
void btGjkPairDetector::setMinkowskiA | ( | btConvexShape * | minkA | ) | [inline] |
Definition at line 66 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision(), and btConvex2dConvex2dAlgorithm::processCollision().
void btGjkPairDetector::setMinkowskiB | ( | btConvexShape * | minkB | ) | [inline] |
Definition at line 71 of file btGjkPairDetector.h.
Referenced by btConvexConvexAlgorithm::processCollision(), and btConvex2dConvex2dAlgorithm::processCollision().
void btGjkPairDetector::setPenetrationDepthSolver | ( | btConvexPenetrationDepthSolver * | penetrationDepthSolver | ) | [inline] |
Definition at line 89 of file btGjkPairDetector.h.
Definition at line 54 of file btGjkPairDetector.h.
Referenced by plNearestPoints().
Definition at line 52 of file btGjkPairDetector.h.
Definition at line 53 of file btGjkPairDetector.h.
Definition at line 51 of file btGjkPairDetector.h.