A half-line origin + t * direction for t >= 0. Callers keep direction normalised (the factories do) so that t is a distance. Every intersection returns the smallest t >= 0 at which the ray is on or inside the shape, or nullopt when it misses; a ray starting inside a closed volume therefore hits at t = 0.
A half-line origin + t * direction for t >= 0. Callers keep direction normalised (the factories do) so that t is a distance. Every intersection returns the smallest t >= 0 at which the ray is on or inside the shape, or nullopt when it misses; a ray starting inside a closed volume therefore hits at t = 0.