The example you provided is not a degenerate case, and it works. This will give correct results. You didn't mention which algorithm you are talking about but I assume you're talking about the
SLABS method (correct me if I am wrong).
The OP was talking about this paper, which is similar to the slabs method and my explanation almost remains the same.
I don't know why you assume
Tmax will be +/-inf, they will simply be equal for the z coordinates, in other words
TminZ = TmaxZ. Keep in mind that for
Tmax to make sense they are calculated for each axis independently.
The case is valid for Tmin and Tmax being +/-infinity the quote from the paper.
Note that the reason we check the sign of each component direction is
to ensure that the intervals produced are ordered (i.e., so that tmin
<= tmax is true). This property is assumed throughout the code, and
allows us to reason about whether the computed intervals overlap. Note
also that since IEEE arithmetic guarantees that a positive number
divided by zero is +1 and a negative number divided by zero is ¡1, the
code works for vertical and horizontal lines (see 2 for a detailed
discussion of this)
Note that your degenerate case was not when Zmin = Zmax. your missing point was when a ray is parallel to a certain axis which could yield
Tz = +/-inf.
If you have a case where the bounding box
min > max then this is not an AABB, and according to the algorithm it doesn't apply since
max>min is a pre-condition for any ray/AABB algorithm; that input is undefined for that certain algorithm.
Moreover any anlytical or algebraic solution should define the domain of the problem (domain as in mathematics) on the input, otherwise running that solution on that input is undefined. And the example you provided is defined for that particular algorithm.