SelectMgr_ViewerSelector::updatePoint3d() - added missing Abs() for computed tolerance
and added check to not attempt transforming undefined 3D point.
{
theCriterion.Point = thePickResult.PickedPoint();
}
+ else if (!thePickResult.IsValid())
+ {
+ theCriterion.Point = thePickResult.PickedPoint();
+ return;
+ }
else
{
theCriterion.Point = theMgr.DetectedPoint (theCriterion.Depth);
}
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();
}
}