mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032337: Visualization - rename Overlaps() method in selection to more self-describable names
- renamed Overlaps and hasOverlap overloaded methods to self-describable names
This commit is contained in:
@@ -270,7 +270,7 @@ Standard_Boolean Select3D_InteriorSensitivePointSet::overlapsElement (SelectBasi
|
||||
const Handle(Select3D_SensitivePoly)& aPolygon = myPlanarPolygons.Value (aPolygIdx);
|
||||
Handle(TColgp_HArray1OfPnt) aPoints;
|
||||
aPolygon->Points3D (aPoints);
|
||||
return theMgr.Overlaps (aPoints, Select3D_TOS_INTERIOR, thePickResult);
|
||||
return theMgr.OverlapsPolygon (aPoints, Select3D_TOS_INTERIOR, thePickResult);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
@@ -89,10 +89,10 @@ Standard_Boolean Select3D_SensitiveBox::Matches (SelectBasics_SelectingVolumeMan
|
||||
if (!theMgr.IsOverlapAllowed()) // check for inclusion
|
||||
{
|
||||
Standard_Boolean isInside = Standard_True;
|
||||
return theMgr.Overlaps (myBox.CornerMin(), myBox.CornerMax(), &isInside) && isInside;
|
||||
return theMgr.OverlapsBox (myBox.CornerMin(), myBox.CornerMax(), &isInside) && isInside;
|
||||
}
|
||||
|
||||
if (!theMgr.Overlaps (myBox.CornerMin(), myBox.CornerMax(), thePickResult)) // check for overlap
|
||||
if (!theMgr.OverlapsBox (myBox.CornerMin(), myBox.CornerMax(), thePickResult)) // check for overlap
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -228,11 +228,11 @@ Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolume
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
{
|
||||
SelectBasics_PickResult aDummy;
|
||||
return theMgr.Overlaps (anArrayOfPnt, mySensType, aDummy);
|
||||
return theMgr.OverlapsPolygon (anArrayOfPnt, mySensType, aDummy);
|
||||
}
|
||||
for (Standard_Integer aPntIdx = anArrayOfPnt->Lower(); aPntIdx <= anArrayOfPnt->Upper(); ++aPntIdx)
|
||||
{
|
||||
if (!theMgr.Overlaps (anArrayOfPnt->Value(aPntIdx)))
|
||||
if (!theMgr.OverlapsPoint (anArrayOfPnt->Value(aPntIdx)))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolume
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
if (!theMgr.Overlaps (anArrayOfPnt, Select3D_TOS_INTERIOR, thePickResult))
|
||||
if (!theMgr.OverlapsPolygon (anArrayOfPnt, Select3D_TOS_INTERIOR, thePickResult))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ Select3D_SensitivePoint::Select3D_SensitivePoint (const Handle(SelectMgr_EntityO
|
||||
Standard_Boolean Select3D_SensitivePoint::Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
SelectBasics_PickResult& thePickResult)
|
||||
{
|
||||
if (!theMgr.Overlaps (myPoint, thePickResult))
|
||||
if (!theMgr.OverlapsPoint (myPoint, thePickResult))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -237,7 +237,7 @@ Standard_Boolean Select3D_SensitivePoly::overlapsElement (SelectBasics_PickResul
|
||||
const Standard_Integer aSegmentIdx = mySegmentIndexes->Value (theElemIdx);
|
||||
gp_Pnt aPnt1 = myPolyg.Pnt3d (aSegmentIdx);
|
||||
gp_Pnt aPnt2 = myPolyg.Pnt3d (aSegmentIdx + 1);
|
||||
return theMgr.Overlaps (aPnt1, aPnt2, thePickResult);
|
||||
return theMgr.OverlapsSegment (aPnt1, aPnt2, thePickResult);
|
||||
}
|
||||
|
||||
//==================================================
|
||||
@@ -257,10 +257,10 @@ Standard_Boolean Select3D_SensitivePoly::elementIsInside (SelectBasics_Selecting
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
{
|
||||
SelectBasics_PickResult aDummy;
|
||||
return theMgr.Overlaps (myPolyg.Pnt3d (aSegmentIdx + 0), myPolyg.Pnt3d (aSegmentIdx + 1), aDummy);
|
||||
return theMgr.OverlapsSegment (myPolyg.Pnt3d (aSegmentIdx + 0), myPolyg.Pnt3d (aSegmentIdx + 1), aDummy);
|
||||
}
|
||||
return theMgr.Overlaps (myPolyg.Pnt3d (aSegmentIdx + 0))
|
||||
&& theMgr.Overlaps (myPolyg.Pnt3d (aSegmentIdx + 1));
|
||||
return theMgr.OverlapsPoint (myPolyg.Pnt3d (aSegmentIdx + 0))
|
||||
&& theMgr.OverlapsPoint (myPolyg.Pnt3d (aSegmentIdx + 1));
|
||||
}
|
||||
|
||||
//==================================================
|
||||
|
@@ -988,7 +988,7 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement (SelectBasics
|
||||
if (myToDetectNode
|
||||
|| myToDetectElem)
|
||||
{
|
||||
if (theIsFullInside || theMgr.Overlaps (aPoint, aPickResult))
|
||||
if (theIsFullInside || theMgr.OverlapsPoint (aPoint, aPickResult))
|
||||
{
|
||||
if (aPickResult.Depth() <= myMinDepthNode)
|
||||
{
|
||||
@@ -1037,7 +1037,7 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement (SelectBasics
|
||||
|
||||
if (myToDetectElem)
|
||||
{
|
||||
if (theIsFullInside || theMgr.Overlaps (aPnts[0], aPnts[1], aPnts[2], Select3D_TOS_INTERIOR, aPickResult))
|
||||
if (theIsFullInside || theMgr.OverlapsTriangle (aPnts[0], aPnts[1], aPnts[2], Select3D_TOS_INTERIOR, aPickResult))
|
||||
{
|
||||
if (aPickResult.Depth() <= myMinDepthElem)
|
||||
{
|
||||
@@ -1056,7 +1056,7 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement (SelectBasics
|
||||
{
|
||||
for (int aNodeIter = 0; aNodeIter < 3; ++aNodeIter)
|
||||
{
|
||||
if (theIsFullInside || theMgr.Overlaps (aPnts[aNodeIter], aPickResult))
|
||||
if (theIsFullInside || theMgr.OverlapsPoint (aPnts[aNodeIter], aPickResult))
|
||||
{
|
||||
if (aPickResult.Depth() <= myMinDepthNode)
|
||||
{
|
||||
@@ -1078,7 +1078,7 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement (SelectBasics
|
||||
{
|
||||
int aNode1 = aNodeIter == 0 ? 2 : (aNodeIter - 1);
|
||||
int aNode2 = aNodeIter;
|
||||
if (theIsFullInside || theMgr.Overlaps (aPnts[aNode1], aPnts[aNode2], aPickResult))
|
||||
if (theIsFullInside || theMgr.OverlapsSegment (aPnts[aNode1], aPnts[aNode2], aPickResult))
|
||||
{
|
||||
if (aPickResult.Depth() <= myMinDepthEdge)
|
||||
{
|
||||
@@ -1147,7 +1147,7 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside (SelectBasics
|
||||
{
|
||||
aPoint = vecToPnt (getPosVec2 (aPointIndex));
|
||||
}
|
||||
if (!theIsFullInside && !theMgr.Overlaps (aPoint))
|
||||
if (!theIsFullInside && !theMgr.OverlapsPoint (aPoint))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1188,9 +1188,9 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside (SelectBasics
|
||||
aPnts[2] = vecToPnt (getPosVec2 (aTriNodes[2]));
|
||||
}
|
||||
|
||||
if (!theIsFullInside && ( !theMgr.Overlaps (aPnts[0])
|
||||
|| !theMgr.Overlaps (aPnts[1])
|
||||
|| !theMgr.Overlaps (aPnts[2])))
|
||||
if (!theIsFullInside && ( !theMgr.OverlapsPoint (aPnts[0])
|
||||
|| !theMgr.OverlapsPoint (aPnts[1])
|
||||
|| !theMgr.OverlapsPoint (aPnts[2])))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -47,12 +47,12 @@ Standard_Boolean Select3D_SensitiveSegment::Matches (SelectBasics_SelectingVolum
|
||||
{
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
{
|
||||
return theMgr.Overlaps (myStart, myEnd, thePickResult);
|
||||
return theMgr.OverlapsSegment (myStart, myEnd, thePickResult);
|
||||
}
|
||||
return theMgr.Overlaps (myStart, thePickResult) && theMgr.Overlaps (myEnd, thePickResult);
|
||||
return theMgr.OverlapsPoint (myStart, thePickResult) && theMgr.OverlapsPoint (myEnd, thePickResult);
|
||||
}
|
||||
|
||||
if (!theMgr.Overlaps (myStart, myEnd, thePickResult)) // check for overlap
|
||||
if (!theMgr.OverlapsSegment (myStart, myEnd, thePickResult)) // check for overlap
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -141,9 +141,9 @@ Standard_Boolean Select3D_SensitiveSet::matches (SelectBasics_SelectingVolumeMan
|
||||
const Select3D_BndBox3d& aGlobalBox = myContent.Box();
|
||||
Standard_Boolean isFullInside = Standard_True;
|
||||
|
||||
if (!theMgr.Overlaps(aGlobalBox.CornerMin(),
|
||||
aGlobalBox.CornerMax(),
|
||||
&isFullInside))
|
||||
if (!theMgr.OverlapsBox (aGlobalBox.CornerMin(),
|
||||
aGlobalBox.CornerMax(),
|
||||
&isFullInside))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -177,13 +177,13 @@ Standard_Boolean Select3D_SensitiveSet::matches (SelectBasics_SelectingVolumeMan
|
||||
Standard_Boolean toCheckLft = Standard_True, toCheckRgh = Standard_True;
|
||||
if (!aNode.IsFullInside)
|
||||
{
|
||||
toCheckLft = theMgr.Overlaps (aBVH->MinPoint (aLeft.Id), aBVH->MaxPoint (aLeft.Id), toCheckFullInside ? &aLeft.IsFullInside : NULL);
|
||||
toCheckLft = theMgr.OverlapsBox (aBVH->MinPoint (aLeft.Id), aBVH->MaxPoint (aLeft.Id), toCheckFullInside ? &aLeft.IsFullInside : NULL);
|
||||
if (!toCheckLft)
|
||||
{
|
||||
aLeft.IsFullInside = Standard_False;
|
||||
}
|
||||
|
||||
toCheckRgh = theMgr.Overlaps (aBVH->MinPoint (aRight.Id), aBVH->MaxPoint (aRight.Id), toCheckFullInside ? &aRight.IsFullInside : NULL);
|
||||
toCheckRgh = theMgr.OverlapsBox (aBVH->MinPoint (aRight.Id), aBVH->MaxPoint (aRight.Id), toCheckFullInside ? &aRight.IsFullInside : NULL);
|
||||
if (!toCheckRgh)
|
||||
{
|
||||
aRight.IsFullInside = Standard_False;
|
||||
|
@@ -53,14 +53,14 @@ Standard_Boolean Select3D_SensitiveTriangle::Matches (SelectBasics_SelectingVolu
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
{
|
||||
SelectBasics_PickResult aDummy;
|
||||
return theMgr.Overlaps (myPoints[0], myPoints[1], myPoints[2], mySensType, aDummy);
|
||||
return theMgr.OverlapsTriangle (myPoints[0], myPoints[1], myPoints[2], mySensType, aDummy);
|
||||
}
|
||||
return theMgr.Overlaps (myPoints[0])
|
||||
&& theMgr.Overlaps (myPoints[1])
|
||||
&& theMgr.Overlaps (myPoints[2]);
|
||||
return theMgr.OverlapsPoint (myPoints[0])
|
||||
&& theMgr.OverlapsPoint (myPoints[1])
|
||||
&& theMgr.OverlapsPoint (myPoints[2]);
|
||||
}
|
||||
|
||||
if (!theMgr.Overlaps (myPoints[0], myPoints[1], myPoints[2], mySensType, thePickResult))
|
||||
if (!theMgr.OverlapsTriangle (myPoints[0], myPoints[1], myPoints[2], mySensType, thePickResult))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -259,9 +259,9 @@ Standard_Boolean Select3D_SensitiveTriangulation::Matches (SelectBasics_Selectin
|
||||
if (!theMgr.IsOverlapAllowed()) // check for inclusion
|
||||
{
|
||||
bool isInside = true;
|
||||
return theMgr.Overlaps (aBndBox.CornerMin(), aBndBox.CornerMax(), &isInside) && isInside;
|
||||
return theMgr.OverlapsBox (aBndBox.CornerMin(), aBndBox.CornerMax(), &isInside) && isInside;
|
||||
}
|
||||
if (!theMgr.Overlaps (aBndBox.CornerMin(), aBndBox.CornerMax(), thePickResult)) // check for overlap
|
||||
if (!theMgr.OverlapsBox (aBndBox.CornerMin(), aBndBox.CornerMax(), thePickResult)) // check for overlap
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -356,7 +356,7 @@ Standard_Boolean Select3D_SensitiveTriangulation::overlapsElement (SelectBasics_
|
||||
myTriangul->Node (aSegmEndIdx)
|
||||
};
|
||||
TColgp_Array1OfPnt anEdgePntsArr (anEdgePnts[0], 1, 2);
|
||||
Standard_Boolean isMatched = theMgr.Overlaps (anEdgePntsArr, Select3D_TOS_BOUNDARY, thePickResult);
|
||||
Standard_Boolean isMatched = theMgr.OverlapsPolygon (anEdgePntsArr, Select3D_TOS_BOUNDARY, thePickResult);
|
||||
return isMatched;
|
||||
}
|
||||
else
|
||||
@@ -366,7 +366,7 @@ Standard_Boolean Select3D_SensitiveTriangulation::overlapsElement (SelectBasics_
|
||||
const gp_Pnt aPnt1 = myTriangul->Node (aNode1);
|
||||
const gp_Pnt aPnt2 = myTriangul->Node (aNode2);
|
||||
const gp_Pnt aPnt3 = myTriangul->Node (aNode3);
|
||||
return theMgr.Overlaps (aPnt1, aPnt2, aPnt3, Select3D_TOS_INTERIOR, thePickResult);
|
||||
return theMgr.OverlapsTriangle (aPnt1, aPnt2, aPnt3, Select3D_TOS_INTERIOR, thePickResult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,9 +391,9 @@ Standard_Boolean Select3D_SensitiveTriangulation::elementIsInside (SelectBasics_
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
{
|
||||
SelectBasics_PickResult aDummy;
|
||||
return theMgr.Overlaps (aSegmPnt1, aSegmPnt2, aDummy);
|
||||
return theMgr.OverlapsSegment (aSegmPnt1, aSegmPnt2, aDummy);
|
||||
}
|
||||
return theMgr.Overlaps (aSegmPnt1) && theMgr.Overlaps (aSegmPnt2);
|
||||
return theMgr.OverlapsPoint (aSegmPnt1) && theMgr.OverlapsPoint (aSegmPnt2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -406,11 +406,11 @@ Standard_Boolean Select3D_SensitiveTriangulation::elementIsInside (SelectBasics_
|
||||
if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline)
|
||||
{
|
||||
SelectBasics_PickResult aDummy;
|
||||
return theMgr.Overlaps (aPnt1, aPnt2, aPnt3, mySensType, aDummy);
|
||||
return theMgr.OverlapsTriangle (aPnt1, aPnt2, aPnt3, mySensType, aDummy);
|
||||
}
|
||||
return theMgr.Overlaps (aPnt1)
|
||||
&& theMgr.Overlaps (aPnt2)
|
||||
&& theMgr.Overlaps (aPnt3);
|
||||
return theMgr.OverlapsPoint (aPnt1)
|
||||
&& theMgr.OverlapsPoint (aPnt2)
|
||||
&& theMgr.OverlapsPoint (aPnt3);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user