Ray Cylinder intersection
问题 I am developing a Ray Tracing system and it is working, now I am trying to support more primitives (for now it supports: spheres, boxes, planes and triangles), and I am having problems with cylinders. I know to intersect ray with cylinder I need to do two check, the first is with the body (with that I get an Infinite Cylinder), for this I assume circle in two dimensions, in the plane xz (x² + z² = r, where r is the radius) then I need check that Y coordinate is between 0 and height and