You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transform your ray by the inverse of your cylinder matrix this way you have the ray in the local space of the cylinder. Then you can use the equation to find the intersection. https://forums.khronos.org/showthread.php/55954
Vector2.Transform() // applies the entire Matrix to the vector
Vector2.TransformNormal() // only applies the Scale and Rotational parts of the Matrix to the vector.
Maybe ray and circumference would be enough.
http://woo4.me/raytracer/translations/
http://woo4.me/wootracer/cylinder-intersection/
Displace Ray
https://github.com/dom767/wootracer/blob/master/CoreTracer/CoreTracer/Code/RenderObject.cpp#L58
Calculate intersection
https://github.com/dom767/wootracer/blob/master/CoreTracer/CoreTracer/Code/RenderCylinder.cpp#L20
The text was updated successfully, but these errors were encountered: