Blender
V3.3
|
#include "LinearMath/btTransform.h"
#include "btGjkEpa3.h"
#include "btGjkCollisionDescription.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
Go to the source code of this file.
Functions | |
template<typename btConvexTemplate > | |
bool | btGjkEpaCalcPenDepth (const btConvexTemplate &a, const btConvexTemplate &b, const btGjkCollisionDescription &colDesc, btVector3 &v, btVector3 &wWitnessOnA, btVector3 &wWitnessOnB) |
template<typename btConvexTemplate , typename btGjkDistanceTemplate > | |
int | btComputeGjkEpaPenetration (const btConvexTemplate &a, const btConvexTemplate &b, const btGjkCollisionDescription &colDesc, btVoronoiSimplexSolver &simplexSolver, btGjkDistanceTemplate *distInfo) |
int btComputeGjkEpaPenetration | ( | const btConvexTemplate & | a, |
const btConvexTemplate & | b, | ||
const btGjkCollisionDescription & | colDesc, | ||
btVoronoiSimplexSolver & | simplexSolver, | ||
btGjkDistanceTemplate * | distInfo | ||
) |
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 61 of file btComputeGjkEpaPenetration.h.
References Freestyle::a, usdtokens::b(), BT_LARGE_FLOAT, btAssert, btGjkEpaCalcPenDepth(), btSqrt(), btTransform, btVector3, blender::math::distance(), distance2(), blender::math::length(), btGjkCollisionDescription::m_firstDir, btGjkCollisionDescription::m_gjkRelError2, btGjkCollisionDescription::m_maxGjkIterations, btGjkCollisionDescription::m_maximumDistanceSquared, SIMD_EPSILON, and w().
bool btGjkEpaCalcPenDepth | ( | const btConvexTemplate & | a, |
const btConvexTemplate & | b, | ||
const btGjkCollisionDescription & | colDesc, | ||
btVector3 & | v, | ||
btVector3 & | wWitnessOnA, | ||
btVector3 & | wWitnessOnB | ||
) |
Definition at line 25 of file btComputeGjkEpaPenetration.h.
References Freestyle::a, usdtokens::b(), btGjkEpaSolver3_Distance(), btGjkEpaSolver3_Penetration(), btVector3, btGjkEpaSolver3::sResults::normal, v, void, and btGjkEpaSolver3::sResults::witnesses.
Referenced by btComputeGjkEpaPenetration().