mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation-persistent objects
SelectMgr_ViewerSelector::updatePoint3d() - added missing Abs() for computed tolerance and added check to not attempt transforming undefined 3D point.
This commit is contained in:
@@ -81,6 +81,11 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter
|
|||||||
{
|
{
|
||||||
theCriterion.Point = thePickResult.PickedPoint();
|
theCriterion.Point = thePickResult.PickedPoint();
|
||||||
}
|
}
|
||||||
|
else if (!thePickResult.IsValid())
|
||||||
|
{
|
||||||
|
theCriterion.Point = thePickResult.PickedPoint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
theCriterion.Point = theMgr.DetectedPoint (theCriterion.Depth);
|
theCriterion.Point = theMgr.DetectedPoint (theCriterion.Depth);
|
||||||
@@ -106,7 +111,7 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Standard_Real aDistFromEye = (theCriterion.Point.XYZ() - myCameraEye.XYZ()).Dot (myCameraDir.XYZ());
|
const Standard_Real aDistFromEye = Abs ((theCriterion.Point.XYZ() - myCameraEye.XYZ()).Dot (myCameraDir.XYZ()));
|
||||||
theCriterion.Tolerance = aDistFromEye * myCameraScale * theEntity->SensitivityFactor();
|
theCriterion.Tolerance = aDistFromEye * myCameraScale * theEntity->SensitivityFactor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user