1 2 3 4 |
if (haven't glimmered for 10 seconds) { RenderGlimmer(); last glimmered = now; } else RenderNormal(); |

]]>

1 2 3 4 |
template <typename T, size_t SIZE> struct RemQual<T [SIZE]> { using type = typename RemQual<T *>::type; }; |

]]>

Cheers!

]]>To handle the case of the AB not lining up nicely on the x axis you will need to project P onto an arbitrary plane. You will also need to figure out how to do the sign checks correctly.

]]>Second, can you please explain a little further how to get the closest point?

You mentioned that “This function can be adapted pretty easily to compute the closest point on the line segment to *p* instead of returning a scalar. The idea is to use the vector from *p* to the closest position on *ab* to project *p* onto the segment *ab*.”

How would that be?

Thanks

]]>