/Engine/Source/Runtime/GeometryCore/Public/MeshQueries.h
For each vertex on MeshA, compute the distance to the nearest point on the surface contained in SpatialB.
template<typename MeshSpatialType> static void VertexToSurfaceDistances ( const TriangleMeshType & MeshA, const MeshSpatialType & SpatialB, [TArray](API\Runtime\Core\Containers\TArray)< double > & Distances )