"Room" Collision detecter

When running two loops, One for the room and another for any sold object collisions
you mentioned that you would take the min of t(in) and t(out)

t(out) -> 1
t(in) -> 0

If you ran the t(in) check first then the second loop would run t(out) = 0 -> t(in)
wouldn't that be quicker? Or is that a premature optimisation?

Edited by jeringa on
Well, the problem is that I'm not sure we could actually leverage that knowledge. In order to compare the t's, we have to find the t's, which is the hard part :( But it is true that if we had good ways to early-out on t values, then we could definitely save work by doing it the way your suggest, since it would potentially put the maximum t value for the start of the second loop closer to the start point.

It is definitely a good thought, though, regardless!

- Casey