kNoHit top-level constant

double const kNoHit

Returned instead of a distance when nothing was hit.

A sentinel rather than double?: these run once per triangle of a mesh, and a nullable double allocates a box on every miss. -1 is unambiguous because every function here rejects intersections behind the ray's origin.

Implementation

const double kNoHit = -1.0;