The distances array is only allocated if there are mesh distances to compare to, so it is empty when there is only a point cloud.
The distances array is only allocated if there are mesh distances to compare to, so it is empty when there is only a point cloud.