distance, closestPointInner and closestPointOuter public functions