ray_pyembree: intersects_location and intersects_any yielding different outputs
mokrueger opened this issue · 0 comments
mokrueger commented
Hi there.
I noticed a tiny bug with the intersects_id
and intersects_first
function in ray_pyembree.py
. I have been using intersects_any to get the "hit_mask" to see which rays hit the object (for multiple_hits=False
) and I noticed that the number of hits returned was off by 1 compared to intersects_location
(which uses intersects_id
).
After checking the code, I noticed that intersects_id
converts to np.float64
as well as calls util.unitize
on the ray_direction
, which causes the difference.
I am guessing it would make sense to perform the same input validations in these functions to ensure everything works as expected.
Kind regards ;)