1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0031295: Foundation Classes, BVH_Tools - incorrect detection of ray-box intersection

This commit is contained in:
osa 2020-01-13 12:14:59 +03:00 committed by bugmaster
parent ef59b5e064
commit 9df71488b3

View File

@ -269,7 +269,7 @@ public: //! @name Ray-Box Intersection
T aTimeEnter = Max (aTimeMin[0], Max (aTimeMin[1], aTimeMin[2])); T aTimeEnter = Max (aTimeMin[0], Max (aTimeMin[1], aTimeMin[2]));
T aTimeLeave = Min (aTimeMax[0], Min (aTimeMax[1], aTimeMax[2])); T aTimeLeave = Min (aTimeMax[0], Min (aTimeMax[1], aTimeMax[2]));
Standard_Boolean hasIntersection = aTimeEnter < aTimeLeave && aTimeLeave > 0; Standard_Boolean hasIntersection = aTimeEnter <= aTimeLeave && aTimeLeave >= 0;
if (hasIntersection) if (hasIntersection)
{ {
theTimeEnter = aTimeEnter; theTimeEnter = aTimeEnter;