Module 

Header 
/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/GJK.h 
Include 
#include "Chaos/GJK.h" 
namespace Chaos
{
template<typename T, typename TGeometryA, typename TGeometryB>
bool
Chaos::GJKDistance
(
const TGeometryA & A,
const TGeometryB & B,
const TRigidTransform
< T, 3 > & BToATM,
T & OutDistance,
TVector
< T, 3 > & OutNearestA,
TVector
< T, 3 > & OutNearestB,
const T Epsilon,
const int32
MaxIts
)
}
Find the distance and nearest points on two convex geometries A and B. All calculations are performed in the localspace of object A, and the transform from Bspace to Aspace must be provided. For algorithm see "A Fast and Robust GJK Implementation for Collision Detection of Convex Objects", Gino Van Deb Bergen, 1999.
This algorithm aborts if objects are overlapping and it does not initialize the out parameters.
true if we succeeded in calculating the distance, false otherwise (i.e., false if objects are overlapping).
Parameter 
Description 

A 
The first object. 
B 
The second object. 
BToATM 
A transform taking vectors in Bspace to Aspace 
B 
The second object. 
OutDistance 
if returns true, the minimum distance between A and B, otherwise not modified. 
OutNearestA 
if returns true, the near point on A in localspace, otherwise not modified. 
OutNearestB 
if returns true, the near point on B in localspace, otherwise not modified. 
Epsilon 
The algorithm terminates when the iterative distance reduction gets below this threshold. 
MaxIts 
A limit on the number of iterations. Results may be approximate if this is too low. 