3 ms·
Here's my solution for a regular cone intersection test (see rayint_cone): https://github.com/jimsnow/glome/blob/master/GlomeTrace/Data/Glome/Cone.hs https://g
by elihu 7y ago
Here's my solution for a regular cone intersection test (see rayint_cone):
https://github.com/jimsnow/glome/blob/master/GlomeTrace/Data/Glome/Cone.hs https://github.com/jimsnow/glome/blob/master/GlomeTrace/Data...
One trick is simplify the problem to just doing a ray-intersection test with an axis-aligned cone, and to handle the general case not by complicating the ray-intersection test but rather applying the inverse transform on the ray itself. You can use the same trick to support oblique cones: just figure out what skew transform you want to apply to the cone, and apply the reverse transform on the ray.