another bug fix in the aabb lines tree

This commit is contained in:
Pavel Mikus 2022-11-30 21:21:26 +01:00 committed by Pavel Mikuš
parent e1af75d6d9
commit 36fbe2be91

View file

@ -74,7 +74,6 @@ inline std::tuple<int, int> coordinate_aligned_ray_hit_count(size_t
// Note that ray and line may overlap, when (line.b[oc] - line.a[oc]) is zero
// In that case, we return negative number
Floating distance_oc = line.b[other_coordinate] - line.a[other_coordinate];
if (distance_oc <= 0) { return {-1, -1}; }
Floating t = (ray_origin[other_coordinate] - line.a[other_coordinate]) / distance_oc;
Floating val_c = line.a[coordinate] + t * (line.b[coordinate] - line.a[coordinate]);
if (ray_origin[coordinate] > val_c) {