code: protected boolean intersectsZ (IRay3 ray, double z) {
          IVector3 origin = ray.origin(), dir = ray.direction();
          double t = (z - origin.z()) / dir.z();
          if (t < 0f) {
              return false;
          }
          double ix = origin.x() + t*dir.x(), iy = origin.y() + t*dir.y();
          return ix >= _minExtent.x && ix <= _maxExtent.x &&
              iy >= _minExtent.y && iy <= _maxExtent.y;
      }
docs: Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box
  at the plane where z equals the value specified.