Demos/ConvexHullDistance/ConvexHullDistanceDemo.cpp to compile again
Allow to use convexProcessingThreshold as maximum distance for convex-convex computation (useful for closest distance/point computation)
This commit is contained in:
@@ -48,6 +48,7 @@ struct btDispatcherInfo
|
||||
m_allowedCcdPenetration(btScalar(0.04)),
|
||||
m_useConvexConservativeDistanceUtil(false),
|
||||
m_convexConservativeDistanceThreshold(0.0f),
|
||||
m_convexMaxDistanceUseCPT(false),
|
||||
m_stackAllocator(0)
|
||||
{
|
||||
|
||||
@@ -64,6 +65,7 @@ struct btDispatcherInfo
|
||||
btScalar m_allowedCcdPenetration;
|
||||
bool m_useConvexConservativeDistanceUtil;
|
||||
btScalar m_convexConservativeDistanceThreshold;
|
||||
bool m_convexMaxDistanceUseCPT;
|
||||
btStackAlloc* m_stackAllocator;
|
||||
};
|
||||
|
||||
|
||||
@@ -357,7 +357,13 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl
|
||||
} else
|
||||
#endif //USE_SEPDISTANCE_UTIL2
|
||||
{
|
||||
input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
|
||||
if (dispatchInfo.m_convexMaxDistanceUseCPT)
|
||||
{
|
||||
input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactProcessingThreshold();
|
||||
} else
|
||||
{
|
||||
input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
|
||||
}
|
||||
input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user