mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032388: Visualization - provide ray-picking interface with zero tolerance for rectangular frustum
This commit is contained in:
@@ -364,8 +364,8 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::ScaleAndTransfor
|
||||
Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box,
|
||||
"Error! SelectMgr_RectangularFrustum::ScaleAndTransform() should be called after selection frustum initialization");
|
||||
|
||||
Standard_ASSERT_RAISE (theScaleFactor > 0,
|
||||
"Error! Pixel tolerance for selection should be greater than zero");
|
||||
Standard_ASSERT_RAISE (theScaleFactor >= 0,
|
||||
"Error! Pixel tolerance for selection should not be negative");
|
||||
|
||||
Handle(SelectMgr_RectangularFrustum) aRes = new SelectMgr_RectangularFrustum();
|
||||
const Standard_Boolean isToScale = theScaleFactor != 1;
|
||||
|
@@ -574,7 +574,7 @@ void SelectMgr_SelectionManager::SetSelectionSensitivity (const Handle(SelectMgr
|
||||
const Standard_Integer theMode,
|
||||
const Standard_Integer theNewSens)
|
||||
{
|
||||
Standard_ASSERT_RAISE (theNewSens > 0, "Error! Selection sensitivity have positive value.");
|
||||
Standard_ASSERT_RAISE (theNewSens >= 0, "Error! Selection sensitivity should not be negative value.");
|
||||
if (theObject.IsNull())
|
||||
{
|
||||
return;
|
||||
|
@@ -78,7 +78,7 @@ void SelectMgr_ToleranceMap::Decrement (const Standard_Integer& theTolerance)
|
||||
if (theTolerance == myLargestKey
|
||||
&& *aFreq == 0)
|
||||
{
|
||||
myLargestKey = 0;
|
||||
myLargestKey = -1;
|
||||
for (NCollection_DataMap<Standard_Integer, Standard_Integer>::Iterator anIter (myTolerances); anIter.More(); anIter.Next())
|
||||
{
|
||||
if (anIter.Value() != 0)
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
//! Returns a current tolerance that must be applied
|
||||
Standard_Integer Tolerance() const
|
||||
{
|
||||
if (myLargestKey < Precision::Confusion())
|
||||
if (myLargestKey < 0)
|
||||
{
|
||||
return 2; // default tolerance value
|
||||
}
|
||||
|
Reference in New Issue
Block a user