mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0029791: Visualization - Wrong result of SelectMgr_RectangularFrustum::IsClipped
SelectMgr_RectangularFrustum::computeClippingRange() fix skipping depth range starting behind the ray.
This commit is contained in:
@@ -675,18 +675,15 @@ void SelectMgr_RectangularFrustum::computeClippingRange (const Graphic3d_Sequenc
|
||||
}
|
||||
|
||||
// compute distance to point of pick line intersection with the plane
|
||||
Standard_Real aParam = aDistance / aDotProduct;
|
||||
|
||||
// check if ray intersects the plane, in case aIntDist < 0
|
||||
// the plane is "behind" the ray
|
||||
const Standard_Real aParam = aDistance / aDotProduct;
|
||||
const gp_Pnt anIntersectionPt = myNearPickedPnt.XYZ() + myViewRayDir.XYZ() * aParam;
|
||||
Standard_Real aDistToPln = anIntersectionPt.Distance (myNearPickedPnt);
|
||||
if (aParam < 0.0)
|
||||
{
|
||||
continue;
|
||||
// the plane is "behind" the ray
|
||||
aDistToPln = -aDistToPln;
|
||||
}
|
||||
|
||||
const gp_Pnt anIntersectionPt = myNearPickedPnt.XYZ() + myViewRayDir.XYZ() * aParam;
|
||||
const Standard_Real aDistToPln = anIntersectionPt.Distance (myNearPickedPnt);
|
||||
|
||||
// change depth limits for case of opposite and directed planes
|
||||
if (aDotProduct < 0.0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user