double minHeight2 = minHeights.getHeight(index2); int point1HightIndex = cachePointIndex(point1, index1, height1, topPointsIndex, mesh); int point2HightIndex = cachePointIndex(point2, index2, height2, topPointsIndex, mesh); int point1BottomIndex = cachePointIndex(point1, index1, minHeight1, bottomPointsIndex, mesh); int point2BottomIndex = cachePointIndex(point2, index2, minHeight2, bottomPointsIndex, mesh);