Point3 p1 = ray.pointAt(I.maximum());
/* Get the range of y-values for the ray within the cell, and
* get the portion of the height matrix within the cell.
*/
Interval h = Interval.between(p0.y(), p1.y());
Matrix slice = height.slice(cell.getX(), cell.getZ(), 2, 2);
boolean hit = false;
/* If the range of y-values intersect, then there may be an
* intersection.
*/
if (h.intersects(slice.range())) {
Box3 bounds = cell.getBoundingBox();
/* Get the points on the height field. */
Point3 p00 = new Point3(bounds.minimumX(), slice.at(0, 0), bounds.minimumZ());