mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 22:35:58 +08:00
another bug fix in the aabb lines tree
This commit is contained in:
parent
e1af75d6d9
commit
36fbe2be91
@ -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
|
// Note that ray and line may overlap, when (line.b[oc] - line.a[oc]) is zero
|
||||||
// In that case, we return negative number
|
// In that case, we return negative number
|
||||||
Floating distance_oc = line.b[other_coordinate] - line.a[other_coordinate];
|
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 t = (ray_origin[other_coordinate] - line.a[other_coordinate]) / distance_oc;
|
||||||
Floating val_c = line.a[coordinate] + t * (line.b[coordinate] - line.a[coordinate]);
|
Floating val_c = line.a[coordinate] + t * (line.b[coordinate] - line.a[coordinate]);
|
||||||
if (ray_origin[coordinate] > val_c) {
|
if (ray_origin[coordinate] > val_c) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user