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
I just noticed that the tests always normalize ray directions, which would address this - is it just always assumed that ray directions are normalized, through the whole library? If so it's unfortunate that it's possible to construct a non-normalized Ray.
All intersection tests assume Ray direction is normalized, to avoid a hidden square root computation. Rays can be created without normalized direction because of the same reason.
We should probably document this behavior more clearly.
https://github.com/rustgd/collision-rs/blob/master/src/volume/sphere.rs#L61 seems to be incorrect. Specifically the computation of
tca
:where
tca
is intended to be the length of the projection ofl
ontor.direction
is incorrect - it needs to be divided by the magnitude ofr.direction
:The text was updated successfully, but these errors were encountered: