Added nextPointSqDistance and prevPointSqDistance to the result
Simplified some condition tests
Added a independent position parameter to getZIntersectionWithTriangle. The distances are now calculated from this point - not the sample point