diff --git a/src/MeshVS/MeshVS_CommonSensitiveEntity.cxx b/src/MeshVS/MeshVS_CommonSensitiveEntity.cxx index 3ac487a66d..77a0c2c5dc 100644 --- a/src/MeshVS/MeshVS_CommonSensitiveEntity.cxx +++ b/src/MeshVS/MeshVS_CommonSensitiveEntity.cxx @@ -254,10 +254,10 @@ Standard_Boolean MeshVS_CommonSensitiveEntity::overlapsElement (SelectBasics_Pic } if (aNbNodes == 3) { - return theMgr.Overlaps (gp_Pnt (aCoords (1), aCoords (2), aCoords (3)), - gp_Pnt (aCoords (4), aCoords (5), aCoords (6)), - gp_Pnt (aCoords (7), aCoords (8), aCoords (9)), - Select3D_TOS_INTERIOR, thePickResult); + return theMgr.OverlapsTriangle (gp_Pnt (aCoords (1), aCoords (2), aCoords (3)), + gp_Pnt (aCoords (4), aCoords (5), aCoords (6)), + gp_Pnt (aCoords (7), aCoords (8), aCoords (9)), + Select3D_TOS_INTERIOR, thePickResult); } MeshVS_Buffer aFacePntsBuf (aNbNodes * 3 * sizeof (Standard_Real)); @@ -268,12 +268,12 @@ Standard_Boolean MeshVS_CommonSensitiveEntity::overlapsElement (SelectBasics_Pic aCoords (3 * aNodeIdx - 1), aCoords (3 * aNodeIdx))); } - return theMgr.Overlaps (aFacePnts, Select3D_TOS_INTERIOR, thePickResult); + return theMgr.OverlapsPolygon (aFacePnts, Select3D_TOS_INTERIOR, thePickResult); } else if (mySelMethod == MeshVS_MSM_NODES) { const gp_Pnt aVert = getVertexByIndex (anItemIdx); - return theMgr.Overlaps (aVert, thePickResult); + return theMgr.OverlapsPoint (aVert, thePickResult); } return Standard_False; } @@ -318,7 +318,7 @@ Standard_Boolean MeshVS_CommonSensitiveEntity::elementIsInside (SelectBasics_Sel const gp_Pnt aPnt (aCoords (3 * aNodeIdx - 2), aCoords (3 * aNodeIdx - 1), aCoords (3 * aNodeIdx)); - if (!theMgr.Overlaps (aPnt)) + if (!theMgr.OverlapsPoint (aPnt)) { return Standard_False; } @@ -328,7 +328,7 @@ Standard_Boolean MeshVS_CommonSensitiveEntity::elementIsInside (SelectBasics_Sel else if (mySelMethod == MeshVS_MSM_NODES) { const gp_Pnt aVert = getVertexByIndex (anItemIdx); - return theMgr.Overlaps (aVert); + return theMgr.OverlapsPoint (aVert); } return Standard_False; } diff --git a/src/MeshVS/MeshVS_SensitivePolyhedron.cxx b/src/MeshVS/MeshVS_SensitivePolyhedron.cxx index d64f322449..447028cb94 100644 --- a/src/MeshVS/MeshVS_SensitivePolyhedron.cxx +++ b/src/MeshVS/MeshVS_SensitivePolyhedron.cxx @@ -86,7 +86,7 @@ Standard_Boolean MeshVS_SensitivePolyhedron::Matches (SelectBasics_SelectingVolu SelectBasics_PickResult aPickResult; for (MeshVS_PolyhedronVertsIter aIter (myTopology); aIter.More(); aIter.Next()) { - if (theMgr.Overlaps (aIter.Value(), Select3D_TOS_INTERIOR, aPickResult)) + if (theMgr.OverlapsPolygon (aIter.Value(), Select3D_TOS_INTERIOR, aPickResult)) { thePickResult = SelectBasics_PickResult::Min (thePickResult, aPickResult); } diff --git a/src/MeshVS/MeshVS_SensitiveQuad.cxx b/src/MeshVS/MeshVS_SensitiveQuad.cxx index 860e50986d..c353945d6b 100644 --- a/src/MeshVS/MeshVS_SensitiveQuad.cxx +++ b/src/MeshVS/MeshVS_SensitiveQuad.cxx @@ -70,12 +70,12 @@ Standard_Boolean MeshVS_SensitiveQuad::Matches (SelectBasics_SelectingVolumeMana if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline) { SelectBasics_PickResult aDummy; - return theMgr.Overlaps (myVertices[0], myVertices[1], myVertices[2], Select3D_TOS_INTERIOR, aDummy) - && theMgr.Overlaps (myVertices[0], myVertices[2], myVertices[3], Select3D_TOS_INTERIOR, aDummy); + return theMgr.OverlapsTriangle (myVertices[0], myVertices[1], myVertices[2], Select3D_TOS_INTERIOR, aDummy) + && theMgr.OverlapsTriangle (myVertices[0], myVertices[2], myVertices[3], Select3D_TOS_INTERIOR, aDummy); } for (Standard_Integer aPntIdx = 0; aPntIdx < 4; ++aPntIdx) { - if (!theMgr.Overlaps (myVertices[aPntIdx])) + if (!theMgr.OverlapsPoint (myVertices[aPntIdx])) return Standard_False; } @@ -84,8 +84,8 @@ Standard_Boolean MeshVS_SensitiveQuad::Matches (SelectBasics_SelectingVolumeMana // check for overlap SelectBasics_PickResult aPickResult1, aPickResult2; - if (!theMgr.Overlaps (myVertices[0], myVertices[1], myVertices[2], Select3D_TOS_INTERIOR, aPickResult1) - && !theMgr.Overlaps (myVertices[0], myVertices[2], myVertices[3], Select3D_TOS_INTERIOR, aPickResult2)) + if (!theMgr.OverlapsTriangle (myVertices[0], myVertices[1], myVertices[2], Select3D_TOS_INTERIOR, aPickResult1) + && !theMgr.OverlapsTriangle (myVertices[0], myVertices[2], myVertices[3], Select3D_TOS_INTERIOR, aPickResult2)) { return Standard_False; } diff --git a/src/Select3D/Select3D_InteriorSensitivePointSet.cxx b/src/Select3D/Select3D_InteriorSensitivePointSet.cxx index 564e3f7995..03d8d0a26b 100644 --- a/src/Select3D/Select3D_InteriorSensitivePointSet.cxx +++ b/src/Select3D/Select3D_InteriorSensitivePointSet.cxx @@ -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); } // ======================================================================= diff --git a/src/Select3D/Select3D_SensitiveBox.cxx b/src/Select3D/Select3D_SensitiveBox.cxx index a9bc457d96..82fce79bc1 100644 --- a/src/Select3D/Select3D_SensitiveBox.cxx +++ b/src/Select3D/Select3D_SensitiveBox.cxx @@ -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; } diff --git a/src/Select3D/Select3D_SensitiveCircle.cxx b/src/Select3D/Select3D_SensitiveCircle.cxx index fca5dfbfd0..d8cfb92828 100644 --- a/src/Select3D/Select3D_SensitiveCircle.cxx +++ b/src/Select3D/Select3D_SensitiveCircle.cxx @@ -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; } diff --git a/src/Select3D/Select3D_SensitivePoint.cxx b/src/Select3D/Select3D_SensitivePoint.cxx index a4a68c06df..b7fc5c9c1f 100644 --- a/src/Select3D/Select3D_SensitivePoint.cxx +++ b/src/Select3D/Select3D_SensitivePoint.cxx @@ -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; } diff --git a/src/Select3D/Select3D_SensitivePoly.cxx b/src/Select3D/Select3D_SensitivePoly.cxx index ebce929629..33e733b1ea 100644 --- a/src/Select3D/Select3D_SensitivePoly.cxx +++ b/src/Select3D/Select3D_SensitivePoly.cxx @@ -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)); } //================================================== diff --git a/src/Select3D/Select3D_SensitivePrimitiveArray.cxx b/src/Select3D/Select3D_SensitivePrimitiveArray.cxx index 7da9ba350e..8c0d0d3fdc 100644 --- a/src/Select3D/Select3D_SensitivePrimitiveArray.cxx +++ b/src/Select3D/Select3D_SensitivePrimitiveArray.cxx @@ -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; } diff --git a/src/Select3D/Select3D_SensitiveSegment.cxx b/src/Select3D/Select3D_SensitiveSegment.cxx index 8726d9d943..38c10a610b 100644 --- a/src/Select3D/Select3D_SensitiveSegment.cxx +++ b/src/Select3D/Select3D_SensitiveSegment.cxx @@ -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; } diff --git a/src/Select3D/Select3D_SensitiveSet.cxx b/src/Select3D/Select3D_SensitiveSet.cxx index d19b216dfd..5c737cc025 100644 --- a/src/Select3D/Select3D_SensitiveSet.cxx +++ b/src/Select3D/Select3D_SensitiveSet.cxx @@ -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; diff --git a/src/Select3D/Select3D_SensitiveTriangle.cxx b/src/Select3D/Select3D_SensitiveTriangle.cxx index f16c2dfb99..8364169a99 100644 --- a/src/Select3D/Select3D_SensitiveTriangle.cxx +++ b/src/Select3D/Select3D_SensitiveTriangle.cxx @@ -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; } diff --git a/src/Select3D/Select3D_SensitiveTriangulation.cxx b/src/Select3D/Select3D_SensitiveTriangulation.cxx index f7bbfa61a2..887ff6edcf 100644 --- a/src/Select3D/Select3D_SensitiveTriangulation.cxx +++ b/src/Select3D/Select3D_SensitiveTriangulation.cxx @@ -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); } } diff --git a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx index 4e065def7b..6c177af4a1 100644 --- a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx +++ b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx @@ -40,50 +40,50 @@ public: virtual Standard_Integer GetActiveSelectionType() const = 0; //! Returns true if selecting volume is overlapped by box theBox - virtual Standard_Boolean Overlaps (const NCollection_Vec3& theBoxMin, - const NCollection_Vec3& theBoxMax, - SelectBasics_PickResult& thePickResult) const = 0; + virtual Standard_Boolean OverlapsBox (const NCollection_Vec3& theBoxMin, + const NCollection_Vec3& theBoxMax, + SelectBasics_PickResult& thePickResult) const = 0; //! Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum //! corner at point theMinPt and maximum at point theMaxPt - virtual Standard_Boolean Overlaps (const NCollection_Vec3& theBoxMin, - const NCollection_Vec3& theBoxMax, - Standard_Boolean* theInside = NULL) const = 0; + virtual Standard_Boolean OverlapsBox (const NCollection_Vec3& theBoxMin, + const NCollection_Vec3& theBoxMax, + Standard_Boolean* theInside = NULL) const = 0; //! Returns true if selecting volume is overlapped by point thePnt - virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - SelectBasics_PickResult& thePickResult) const = 0; + virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + SelectBasics_PickResult& thePickResult) const = 0; //! Returns true if selecting volume is overlapped by point thePnt. //! Does not perform depth calculation, so this method is defined as //! helper function for inclusion test. - virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const = 0; + virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const = 0; //! Returns true if selecting volume is overlapped by planar convex polygon, which points //! are stored in theArrayOfPts, taking into account sensitivity type theSensType - virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const = 0; + virtual Standard_Boolean OverlapsPolygon (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const = 0; //! Returns true if selecting volume is overlapped by planar convex polygon, which points //! are stored in theArrayOfPts, taking into account sensitivity type theSensType - virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPts, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const = 0; + virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const = 0; //! Returns true if selecting volume is overlapped by line segment with start point at thePt1 //! and end point at thePt2 - virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, - const gp_Pnt& thePt2, - SelectBasics_PickResult& thePickResult) const = 0; + virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePt1, + const gp_Pnt& thePt2, + SelectBasics_PickResult& thePickResult) const = 0; //! Returns true if selecting volume is overlapped by triangle with vertices thePt1, //! thePt2 and thePt3, taking into account sensitivity type theSensType - virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, - const gp_Pnt& thePt2, - const gp_Pnt& thePt3, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const = 0; + virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePt1, + const gp_Pnt& thePt2, + const gp_Pnt& thePt3, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const = 0; //! Calculates distance from 3d projection of user-defined selection point //! to the given point theCOG diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index e7c8d38c6a..c3e252f8e1 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -194,12 +194,12 @@ bool SelectMgr_AxisIntersector::rayPlaneIntersection (const gp_Vec& thePlane, } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -218,13 +218,13 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const SelectMgr_Vec3& theB } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -250,12 +250,12 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const SelectMgr_Vec3& theB } // ======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -273,10 +273,10 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt, } // ======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint (const gp_Pnt& thePnt) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -286,13 +286,13 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt) cons } // ======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -306,13 +306,13 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt1, } // ======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -352,7 +352,7 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const TColgp_Array1OfPnt& if (aPolyNorm.Magnitude() <= Precision::Confusion()) { // treat degenerated polygon as point - return Overlaps (theArrayOfPnts.First(), theClipRange, thePickResult); + return OverlapsPoint (theArrayOfPnts.First(), theClipRange, thePickResult); } else if (!rayPlaneIntersection (aPolyNorm, theArrayOfPnts.First(), thePickResult)) { @@ -364,15 +364,15 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const TColgp_Array1OfPnt& } // ======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : // ======================================================================= -Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_AxisIntersector::OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); @@ -381,7 +381,7 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt1, { const gp_Pnt aPntsArrayBuf[4] = { thePnt1, thePnt2, thePnt3, thePnt1 }; const TColgp_Array1OfPnt aPntsArray (aPntsArrayBuf[0], 1, 4); - return Overlaps (aPntsArray, Select3D_TOS_BOUNDARY, theClipRange, thePickResult); + return OverlapsPolygon (aPntsArray, Select3D_TOS_BOUNDARY, theClipRange, thePickResult); } else if (theSensType == Select3D_TOS_INTERIOR) { @@ -394,10 +394,10 @@ Standard_Boolean SelectMgr_AxisIntersector::Overlaps (const gp_Pnt& thePnt1, { // consider degenerated triangle as point or segment return aTrEdges[0].SquareModulus() > gp::Resolution() - ? Overlaps (thePnt1, thePnt2, theClipRange, thePickResult) + ? OverlapsSegment (thePnt1, thePnt2, theClipRange, thePickResult) : (aTrEdges[1].SquareModulus() > gp::Resolution() - ? Overlaps (thePnt2, thePnt3, theClipRange, thePickResult) - : Overlaps (thePnt1, theClipRange, thePickResult)); + ? OverlapsSegment (thePnt2, thePnt3, theClipRange, thePickResult) + : OverlapsPoint (thePnt1, theClipRange, thePickResult)); } const gp_Pnt aPnts[3] = {thePnt1, thePnt2, thePnt3}; diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.hxx b/src/SelectMgr/SelectMgr_AxisIntersector.hxx index 69cf55cabd..9f7b95a478 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.hxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.hxx @@ -49,48 +49,48 @@ public: public: //! Intersection test between defined axis and given axis-aligned box - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Returns true if selecting axis intersects axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside) const Standard_OVERRIDE; //! Intersection test between defined axis and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Intersection test between defined axis and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const Standard_OVERRIDE; //! Intersection test between defined axis and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Checks if selecting axis intersects line segment - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Intersection test between defined axis and given triangle. The test may //! be considered of interior part or boundary line defined by triangle vertices //! depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; public: diff --git a/src/SelectMgr/SelectMgr_BaseFrustum.cxx b/src/SelectMgr/SelectMgr_BaseFrustum.cxx index d90fba5278..d61e930882 100644 --- a/src/SelectMgr/SelectMgr_BaseFrustum.cxx +++ b/src/SelectMgr/SelectMgr_BaseFrustum.cxx @@ -144,89 +144,89 @@ void SelectMgr_BaseFrustum::SetBuilder (const Handle(SelectMgr_FrustumBuilder)& } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : SAT intersection test between defined volume and // given axis-aligned box //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const SelectMgr_Vec3& /*theBoxMin*/, - const SelectMgr_Vec3& /*theBoxMax*/, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& /*thePickResult*/) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsBox (const SelectMgr_Vec3& /*theBoxMin*/, + const SelectMgr_Vec3& /*theBoxMax*/, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& /*thePickResult*/) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : Intersection test between defined volume and given point //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const SelectMgr_Vec3& /*theBoxMin*/, - const SelectMgr_Vec3& /*theBoxMax*/, - Standard_Boolean* /*theInside*/) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsBox (const SelectMgr_Vec3& /*theBoxMin*/, + const SelectMgr_Vec3& /*theBoxMax*/, + Standard_Boolean* /*theInside*/) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePnt*/, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& ) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsPoint (const gp_Pnt& /*thePnt*/, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& ) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePnt*/) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsPoint (const gp_Pnt& /*thePnt*/) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : SAT intersection test between defined volume and given // ordered set of points, representing line segments. The test // may be considered of interior part or boundary line defined // by segments depending on given sensitivity type //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const TColgp_Array1OfPnt& /*theArrayOfPnts*/, - Select3D_TypeOfSensitivity /*theSensType*/, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& ) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsPolygon (const TColgp_Array1OfPnt& /*theArrayOfPnts*/, + Select3D_TypeOfSensitivity /*theSensType*/, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& ) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : SAT intersection test between defined volume and given // triangle. The test may be considered of interior part or // boundary line defined by triangle vertices depending on // given sensitivity type //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt1*/, - const gp_Pnt& /*thePt2*/, - const gp_Pnt& /*thePt3*/, - Select3D_TypeOfSensitivity /*theSensType*/, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& ) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsTriangle (const gp_Pnt& /*thePt1*/, + const gp_Pnt& /*thePt2*/, + const gp_Pnt& /*thePt3*/, + Select3D_TypeOfSensitivity /*theSensType*/, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& ) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : Checks if line segment overlaps selecting volume //======================================================================= -Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePnt1*/, - const gp_Pnt& /*thePnt2*/, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& ) const +Standard_Boolean SelectMgr_BaseFrustum::OverlapsSegment (const gp_Pnt& /*thePnt1*/, + const gp_Pnt& /*thePnt2*/, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& ) const { return Standard_False; } diff --git a/src/SelectMgr/SelectMgr_BaseFrustum.hxx b/src/SelectMgr/SelectMgr_BaseFrustum.hxx index bfb7107f98..e303b04452 100644 --- a/src/SelectMgr/SelectMgr_BaseFrustum.hxx +++ b/src/SelectMgr/SelectMgr_BaseFrustum.hxx @@ -75,51 +75,51 @@ public: //! SAT intersection test between defined volume and given axis-aligned box - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Returns true if selecting volume is overlapped by axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Intersection test between defined volume and given point //! Does not perform depth calculation, so this method is defined as //! helper function for inclusion test. Therefore, its implementation //! makes sense only for rectangular frustum with box selection mode activated. - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Checks if line segment overlaps selecting frustum - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given triangle. The test may //! be considered of interior part or boundary line defined by triangle vertices //! depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, - const gp_Pnt& thePt2, - const gp_Pnt& thePt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePt1, + const gp_Pnt& thePt2, + const gp_Pnt& thePt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.cxx b/src/SelectMgr/SelectMgr_BaseIntersector.cxx index 4552ca1752..1dadf955de 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.cxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.cxx @@ -165,83 +165,83 @@ const gp_Pnt2d& SelectMgr_BaseIntersector::GetMousePosition() const } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const SelectMgr_Vec3&, - const SelectMgr_Vec3&, - const SelectMgr_ViewClipRange&, - SelectBasics_PickResult&) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsBox (const SelectMgr_Vec3&, + const SelectMgr_Vec3&, + const SelectMgr_ViewClipRange&, + SelectBasics_PickResult&) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const SelectMgr_Vec3&, - const SelectMgr_Vec3&, - Standard_Boolean*) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsBox (const SelectMgr_Vec3&, + const SelectMgr_Vec3&, + Standard_Boolean*) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const gp_Pnt&, - const SelectMgr_ViewClipRange&, - SelectBasics_PickResult&) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsPoint (const gp_Pnt&, + const SelectMgr_ViewClipRange&, + SelectBasics_PickResult&) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const gp_Pnt& thePnt) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsPoint (const gp_Pnt& thePnt) const { (void )thePnt; return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const TColgp_Array1OfPnt&, - Select3D_TypeOfSensitivity, - const SelectMgr_ViewClipRange&, - SelectBasics_PickResult&) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsPolygon (const TColgp_Array1OfPnt&, + Select3D_TypeOfSensitivity, + const SelectMgr_ViewClipRange&, + SelectBasics_PickResult&) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const gp_Pnt&, - const gp_Pnt&, - const gp_Pnt&, - Select3D_TypeOfSensitivity, - const SelectMgr_ViewClipRange&, - SelectBasics_PickResult&) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsTriangle (const gp_Pnt&, + const gp_Pnt&, + const gp_Pnt&, + Select3D_TypeOfSensitivity, + const SelectMgr_ViewClipRange&, + SelectBasics_PickResult&) const { return Standard_False; } //======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : //======================================================================= -Standard_Boolean SelectMgr_BaseIntersector::Overlaps (const gp_Pnt&, - const gp_Pnt&, - const SelectMgr_ViewClipRange&, - SelectBasics_PickResult&) const +Standard_Boolean SelectMgr_BaseIntersector::OverlapsSegment (const gp_Pnt&, + const gp_Pnt&, + const SelectMgr_ViewClipRange&, + SelectBasics_PickResult&) const { return Standard_False; } diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.hxx b/src/SelectMgr/SelectMgr_BaseIntersector.hxx index ef6e238c36..bc2b5b41d7 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.hxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.hxx @@ -150,51 +150,51 @@ public: public: //! SAT intersection test between defined volume and given axis-aligned box - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const; //! Returns true if selecting volume is overlapped by axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside = NULL) const; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside = NULL) const; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const; //! Intersection test between defined volume and given point //! Does not perform depth calculation, so this method is defined as //! helper function for inclusion test. Therefore, its implementation //! makes sense only for rectangular frustum with box selection mode activated. - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const; //! SAT intersection test between defined volume and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const; //! Checks if line segment overlaps selecting frustum - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const; //! SAT intersection test between defined volume and given triangle. The test may //! be considered of interior part or boundary line defined by triangle vertices //! depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1, - const gp_Pnt& thePt2, - const gp_Pnt& thePt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const; + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePt1, + const gp_Pnt& thePt2, + const gp_Pnt& thePt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const; public: diff --git a/src/SelectMgr/SelectMgr_Frustum.hxx b/src/SelectMgr/SelectMgr_Frustum.hxx index 52a97c5e9d..8b49b30ed0 100644 --- a/src/SelectMgr/SelectMgr_Frustum.hxx +++ b/src/SelectMgr/SelectMgr_Frustum.hxx @@ -67,26 +67,26 @@ protected: //! Returns true if selecting volume is overlapped by axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_Boolean hasOverlap (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside = NULL) const; + Standard_Boolean hasBoxOverlap (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside = NULL) const; //! SAT intersection test between defined volume and given point - Standard_Boolean hasOverlap (const gp_Pnt& thePnt) const; + Standard_Boolean hasPointOverlap (const gp_Pnt& thePnt) const; //! SAT intersection test between defined volume and given segment - Standard_Boolean hasOverlap (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2) const; + Standard_Boolean hasSegmentOverlap (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2) const; //! SAT intersection test between frustum given and planar convex polygon represented as ordered point set - Standard_Boolean hasOverlap (const TColgp_Array1OfPnt& theArrayOfPnts, - gp_Vec& theNormal) const; + Standard_Boolean hasPolygonOverlap (const TColgp_Array1OfPnt& theArrayOfPnts, + gp_Vec& theNormal) const; //! SAT intersection test between defined volume and given triangle - Standard_Boolean hasOverlap (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - gp_Vec& theNormal) const; + Standard_Boolean hasTriangleOverlap (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + gp_Vec& theNormal) const; private: diff --git a/src/SelectMgr/SelectMgr_Frustum.lxx b/src/SelectMgr/SelectMgr_Frustum.lxx index fabfd004e9..582f88f4d0 100644 --- a/src/SelectMgr/SelectMgr_Frustum.lxx +++ b/src/SelectMgr/SelectMgr_Frustum.lxx @@ -122,15 +122,15 @@ Standard_Boolean SelectMgr_Frustum::isSeparated (const gp_Pnt& thePnt1, } // ======================================================================= -// function : hasOverlap +// function : hasBoxOverlap // purpose : Returns true if selecting volume is overlapped by // axis-aligned bounding box with minimum corner at point // theMinPnt and maximum at point theMaxPnt // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::hasOverlap (const SelectMgr_Vec3& theMinPnt, - const SelectMgr_Vec3& theMaxPnt, - Standard_Boolean* theInside) const +Standard_Boolean SelectMgr_Frustum::hasBoxOverlap (const SelectMgr_Vec3& theMinPnt, + const SelectMgr_Vec3& theMaxPnt, + Standard_Boolean* theInside) const { for (Standard_Integer anAxis = 0; anAxis < 3; ++anAxis) { @@ -200,11 +200,11 @@ Standard_Boolean SelectMgr_Frustum::hasOverlap (const SelectMgr_Vec3& theMinP } // ======================================================================= -// function : hasOverlap +// function : hasPointOverlap // purpose : SAT intersection test between defined volume and given point // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::hasOverlap (const gp_Pnt& thePnt) const +Standard_Boolean SelectMgr_Frustum::hasPointOverlap (const gp_Pnt& thePnt) const { const Standard_Integer anIncFactor = (myIsOrthographic && N == 4) ? 2 : 1; @@ -223,12 +223,12 @@ Standard_Boolean SelectMgr_Frustum::hasOverlap (const gp_Pnt& thePnt) const } // ======================================================================= -// function : hasOverlap +// function : hasSegmentOverlap // purpose : SAT intersection test between defined volume and given segment // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::hasOverlap (const gp_Pnt& theStartPnt, - const gp_Pnt& theEndPnt) const +Standard_Boolean SelectMgr_Frustum::hasSegmentOverlap (const gp_Pnt& theStartPnt, + const gp_Pnt& theEndPnt) const { const gp_XYZ& aDir = theEndPnt.XYZ() - theStartPnt.XYZ(); if (aDir.Modulus() < Precision::Confusion()) @@ -304,13 +304,13 @@ Standard_Boolean SelectMgr_Frustum::hasOverlap (const gp_Pnt& theStartPnt, } // ======================================================================= -// function : hasOverlap +// function : hasPolygonOverlap // purpose : SAT intersection test between frustum given and planar convex // polygon represented as ordered point set // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::hasOverlap (const TColgp_Array1OfPnt& theArrayOfPnts, - gp_Vec& theNormal) const +Standard_Boolean SelectMgr_Frustum::hasPolygonOverlap (const TColgp_Array1OfPnt& theArrayOfPnts, + gp_Vec& theNormal) const { Standard_Integer aStartIdx = theArrayOfPnts.Lower(); Standard_Integer anEndIdx = theArrayOfPnts.Upper(); @@ -400,14 +400,14 @@ Standard_Boolean SelectMgr_Frustum::hasOverlap (const TColgp_Array1OfPnt& the } // ======================================================================= -// function : hasOverlap +// function : hasTriangleOverlap // purpose : SAT intersection test between defined volume and given triangle // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::hasOverlap (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - gp_Vec& theNormal) const +Standard_Boolean SelectMgr_Frustum::hasTriangleOverlap (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + gp_Vec& theNormal) const { const gp_XYZ aTrEdges[3] = { thePnt2.XYZ() - thePnt1.XYZ(), thePnt3.XYZ() - thePnt2.XYZ(), diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 27ee456421..1cd8dff2d4 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -457,35 +457,35 @@ Standard_Boolean SelectMgr_RectangularFrustum::IsScalable() const } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : Returns true if selecting volume is overlapped by // axis-aligned bounding box with minimum corner at point // theMinPnt and maximum at point theMaxPnt // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - return hasOverlap (theBoxMin, theBoxMax, theInside); + return hasBoxOverlap (theBoxMin, theBoxMax, theInside); } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : SAT intersection test between defined volume and // given axis-aligned box // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - if (!hasOverlap (theBoxMin, theBoxMax)) + if (!hasBoxOverlap (theBoxMin, theBoxMax)) return Standard_False; Standard_Real aDepth = 0.0; @@ -518,17 +518,17 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const SelectMgr_Vec3& t } // ======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - if (!hasOverlap (thePnt)) + if (!hasPointOverlap (thePnt)) return Standard_False; gp_XYZ aV = thePnt.XYZ() - myNearPickedPnt.XYZ(); @@ -541,30 +541,30 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt, } // ======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsPoint (const gp_Pnt& thePnt) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - return hasOverlap (thePnt); + return hasPointOverlap (thePnt); } // ======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : Checks if line segment overlaps selecting frustum // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - if (!hasOverlap (thePnt1, thePnt2)) + if (!hasSegmentOverlap (thePnt1, thePnt2)) return Standard_False; segmentSegmentDistance (thePnt1, thePnt2, thePickResult); @@ -573,16 +573,16 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, } // ======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : SAT intersection test between defined volume and given // ordered set of points, representing line segments. The test // may be considered of interior part or boundary line defined // by segments depending on given sensitivity type // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); @@ -598,7 +598,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const TColgp_Array1OfPn { const gp_Pnt& aStartPnt = theArrayOfPnts.Value (aPntIter); const gp_Pnt& aEndPnt = theArrayOfPnts.Value (aPntIter == anUpper ? aLower : (aPntIter + 1)); - if (hasOverlap (aStartPnt, aEndPnt)) + if (hasSegmentOverlap (aStartPnt, aEndPnt)) { aMatchingSegmentsNb++; segmentSegmentDistance (aStartPnt, aEndPnt, aPickResult); @@ -612,7 +612,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const TColgp_Array1OfPn else if (theSensType == Select3D_TOS_INTERIOR) { gp_Vec aPolyNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); - if (!hasOverlap (theArrayOfPnts, aPolyNorm)) + if (!hasPolygonOverlap (theArrayOfPnts, aPolyNorm)) { return Standard_False; } @@ -620,7 +620,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const TColgp_Array1OfPn if (aPolyNorm.Magnitude() <= Precision::Confusion()) { // treat degenerated polygon as point - return Overlaps (theArrayOfPnts.First(), theClipRange, thePickResult); + return OverlapsPoint (theArrayOfPnts.First(), theClipRange, thePickResult); } else if (!segmentPlaneIntersection (aPolyNorm, theArrayOfPnts.First(), thePickResult)) { @@ -632,18 +632,18 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const TColgp_Array1OfPn } // ======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : SAT intersection test between defined volume and given // triangle. The test may be considered of interior part or // boundary line defined by triangle vertices depending on // given sensitivity type // ======================================================================= -Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); @@ -652,12 +652,12 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, { const gp_Pnt aPntsArrayBuf[4] = { thePnt1, thePnt2, thePnt3, thePnt1 }; const TColgp_Array1OfPnt aPntsArray (aPntsArrayBuf[0], 1, 4); - return Overlaps (aPntsArray, Select3D_TOS_BOUNDARY, theClipRange, thePickResult); + return OverlapsPolygon (aPntsArray, Select3D_TOS_BOUNDARY, theClipRange, thePickResult); } else if (theSensType == Select3D_TOS_INTERIOR) { gp_Vec aTriangleNormal (gp_XYZ (RealLast(), RealLast(), RealLast())); - if (!hasOverlap (thePnt1, thePnt2, thePnt3, aTriangleNormal)) + if (!hasTriangleOverlap (thePnt1, thePnt2, thePnt3, aTriangleNormal)) { return Standard_False; } @@ -669,10 +669,10 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, { // consider degenerated triangle as point or segment return aTrEdges[0].SquareModulus() > gp::Resolution() - ? Overlaps (thePnt1, thePnt2, theClipRange, thePickResult) + ? OverlapsSegment (thePnt1, thePnt2, theClipRange, thePickResult) : (aTrEdges[1].SquareModulus() > gp::Resolution() - ? Overlaps (thePnt2, thePnt3, theClipRange, thePickResult) - : Overlaps (thePnt1, theClipRange, thePickResult)); + ? OverlapsSegment (thePnt2, thePnt3, theClipRange, thePickResult) + : OverlapsPoint (thePnt1, theClipRange, thePickResult)); } const gp_Pnt aPnts[3] = {thePnt1, thePnt2, thePnt3}; diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx index 4d88c1dac5..02ace895ae 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx @@ -90,48 +90,48 @@ public: // SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Returns true if selecting volume is overlapped by axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside) const Standard_OVERRIDE; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Checks if line segment overlaps selecting frustum - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given triangle. The test may //! be considered of interior part or boundary line defined by triangle vertices //! depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Measures distance between 3d projection of user-picked //! screen point and given point theCOG. diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index b9130f5419..b8045dc686 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -329,143 +329,143 @@ void SelectMgr_SelectingVolumeManager::BuildSelectingVolume (const TColgp_Array1 } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : SAT intersection test between defined volume and // given axis-aligned box //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (theBoxMin, theBoxMax, myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsBox (theBoxMin, theBoxMax, myViewClipRange, thePickResult); } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : Intersection test between defined volume and given point //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (theBoxMin, theBoxMax, theInside); + return myActiveSelectingVolume->OverlapsBox (theBoxMin, theBoxMax, theInside); } //======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePnt, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsPoint (const gp_Pnt& thePnt, + SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (thePnt, myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsPoint (thePnt, myViewClipRange, thePickResult); } //======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePnt) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsPoint (const gp_Pnt& thePnt) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (thePnt); + return myActiveSelectingVolume->OverlapsPoint (thePnt); } //======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : SAT intersection test between defined volume and given // ordered set of points, representing line segments. The test // may be considered of interior part or boundary line defined // by segments depending on given sensitivity type //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsPolygon (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (theArrayOfPnts->Array1(), (Select3D_TypeOfSensitivity)theSensType, - myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsPolygon (theArrayOfPnts->Array1(), (Select3D_TypeOfSensitivity)theSensType, + myViewClipRange, thePickResult); } //======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : SAT intersection test between defined volume and given // ordered set of points, representing line segments. The test // may be considered of interior part or boundary line defined // by segments depending on given sensitivity type //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (theArrayOfPnts, (Select3D_TypeOfSensitivity)theSensType, - myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsPolygon (theArrayOfPnts, (Select3D_TypeOfSensitivity)theSensType, + myViewClipRange, thePickResult); } //======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : Checks if line segment overlaps selecting volume //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt1, - const gp_Pnt& thePt2, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsSegment (const gp_Pnt& thePt1, + const gp_Pnt& thePt2, + SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (thePt1, thePt2, myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsSegment (thePt1, thePt2, myViewClipRange, thePickResult); } //======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : SAT intersection test between defined volume and given // triangle. The test may be considered of interior part or // boundary line defined by triangle vertices depending on // given sensitivity type //======================================================================= -Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt1, - const gp_Pnt& thePt2, - const gp_Pnt& thePt3, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsTriangle (const gp_Pnt& thePt1, + const gp_Pnt& thePt2, + const gp_Pnt& thePt3, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return Standard_False; } - return myActiveSelectingVolume->Overlaps (thePt1, thePt2, thePt3, (Select3D_TypeOfSensitivity)theSensType, - myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsTriangle (thePt1, thePt2, thePt3, (Select3D_TypeOfSensitivity)theSensType, + myViewClipRange, thePickResult); } //======================================================================= diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index 2d0b687b66..4bc7431404 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -130,51 +130,50 @@ public: //! SAT intersection test between defined volume and given axis-aligned box - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Returns true if selecting volume is overlapped by axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, - const SelectMgr_Vec3& theBoxMax, - Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPts, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Checks if line segment overlaps selecting frustum - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given triangle. The test may //! be considered of interior part or boundary line defined by triangle vertices //! depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Standard_Integer theSensType, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; - + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Measures distance between 3d projection of user-picked //! screen point and given point theCOG @@ -271,6 +270,84 @@ public: Standard_DEPRECATED("Deprecated method - InitPolylineSelectingVolume() and Build() should be used instead") Standard_EXPORT void BuildSelectingVolume (const TColgp_Array1OfPnt2d& thePoints); + //! SAT intersection test between defined volume and given axis-aligned box + Standard_DEPRECATED ("Deprecated method - OverlapsBox() should be used instead") + Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + SelectBasics_PickResult& thePickResult) const + { + return OverlapsBox (theBoxMin, theBoxMax, thePickResult); + } + + //! Returns true if selecting volume is overlapped by axis-aligned bounding box + //! with minimum corner at point theMinPt and maximum at point theMaxPt + Standard_DEPRECATED ("Deprecated method - OverlapsBox() should be used instead") + Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin, + const SelectMgr_Vec3& theBoxMax, + Standard_Boolean* theInside = NULL) const + { + return OverlapsBox (theBoxMin, theBoxMax, theInside); + } + + //! Intersection test between defined volume and given point + Standard_DEPRECATED ("Deprecated method - OverlapsPoint() should be used instead") + Standard_Boolean Overlaps (const gp_Pnt& thePnt, + SelectBasics_PickResult& thePickResult) const + { + return OverlapsPoint (thePnt, thePickResult); + } + + //! Intersection test between defined volume and given point + Standard_DEPRECATED ("Deprecated method - OverlapsPoint() should be used instead") + Standard_Boolean Overlaps (const gp_Pnt& thePnt) const + { + return OverlapsPoint (thePnt); + } + + //! SAT intersection test between defined volume and given ordered set of points, + //! representing line segments. The test may be considered of interior part or + //! boundary line defined by segments depending on given sensitivity type + Standard_DEPRECATED ("Deprecated method - OverlapsPolygon() should be used instead") + Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const + { + return OverlapsPolygon (theArrayOfPts, theSensType, thePickResult); + } + + //! SAT intersection test between defined volume and given ordered set of points, + //! representing line segments. The test may be considered of interior part or + //! boundary line defined by segments depending on given sensitivity type + Standard_DEPRECATED ("Deprecated method - OverlapsPolygon() should be used instead") + Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPts, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const + { + return OverlapsPolygon (theArrayOfPts, theSensType, thePickResult); + } + + //! Checks if line segment overlaps selecting frustum + Standard_DEPRECATED ("Deprecated method - OverlapsSegment() should be used instead") + Standard_Boolean Overlaps (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + SelectBasics_PickResult& thePickResult) const + { + return OverlapsSegment (thePnt1, thePnt2, thePickResult); + } + + //! SAT intersection test between defined volume and given triangle. The test may + //! be considered of interior part or boundary line defined by triangle vertices + //! depending on given sensitivity type + Standard_DEPRECATED ("Deprecated method - OverlapsTriangle() should be used instead") + Standard_Boolean Overlaps (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Standard_Integer theSensType, + SelectBasics_PickResult& thePickResult) const + { + return OverlapsTriangle (thePnt1, thePnt2, thePnt3, theSensType, thePickResult); + } + private: Handle(SelectMgr_BaseIntersector) myActiveSelectingVolume; Handle(Graphic3d_SequenceOfHClipPlane) myViewClipPlanes; //!< view clipping planes diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index 8395cb8a7a..c27aa4b668 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -177,53 +177,53 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::ScaleAndTransform } //======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : SAT intersection test between defined volume and // given axis-aligned box //======================================================================= -Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const SelectMgr_Vec3& theMinPt, - const SelectMgr_Vec3& theMaxPt, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& /*thePickResult*/) const +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsBox (const SelectMgr_Vec3& theMinPt, + const SelectMgr_Vec3& theMaxPt, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& /*thePickResult*/) const { - return hasOverlap (theMinPt, theMaxPt); + return hasBoxOverlap (theMinPt, theMaxPt); } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : Returns true if selecting volume is overlapped by // axis-aligned bounding box with minimum corner at point // theMinPt and maximum at point theMaxPt // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const SelectMgr_Vec3& theMinPt, - const SelectMgr_Vec3& theMaxPt, - Standard_Boolean* /*theInside*/) const +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsBox (const SelectMgr_Vec3& theMinPt, + const SelectMgr_Vec3& theMaxPt, + Standard_Boolean* /*theInside*/) const { - return hasOverlap (theMinPt, theMaxPt, NULL); + return hasBoxOverlap (theMinPt, theMaxPt, NULL); } // ======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : Intersection test between defined volume and given point // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& /*thePickResult*/) const +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& /*thePickResult*/) const { - return hasOverlap (thePnt); + return hasPointOverlap (thePnt); } // ======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : SAT intersection test between defined volume and given // ordered set of points, representing line segments. The test // may be considered of interior part or boundary line defined // by segments depending on given sensitivity type // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& /*thePickResult*/) const +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& /*thePickResult*/) const { if (theSensType == Select3D_TOS_BOUNDARY) { @@ -233,7 +233,7 @@ Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const TColgp_Array1OfPnt { const gp_Pnt& aStartPt = theArrayOfPnts.Value (aPtIdx); const gp_Pnt& aEndPt = theArrayOfPnts.Value (aPtIdx == anUpper ? aLower : (aPtIdx + 1)); - if (!hasOverlap (aStartPt, aEndPt)) + if (!hasSegmentOverlap (aStartPt, aEndPt)) { return Standard_False; } @@ -242,48 +242,48 @@ Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const TColgp_Array1OfPnt else if (theSensType == Select3D_TOS_INTERIOR) { gp_Vec aNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); - return hasOverlap (theArrayOfPnts, aNorm); + return hasPolygonOverlap (theArrayOfPnts, aNorm); } return Standard_False; } // ======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : Checks if line segment overlaps selecting frustum // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& /*theClipRange*/, - SelectBasics_PickResult& /*thePickResult*/) const +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& /*theClipRange*/, + SelectBasics_PickResult& /*thePickResult*/) const { - return hasOverlap (thePnt1, thePnt2); + return hasSegmentOverlap (thePnt1, thePnt2); } // ======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : SAT intersection test between defined volume and given // triangle. The test may be considered of interior part or // boundary line defined by triangle vertices depending on // given sensitivity type // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { if (theSensType == Select3D_TOS_BOUNDARY) { const gp_Pnt aPntsArrayBuf[3] = { thePnt1, thePnt2, thePnt3 }; const TColgp_Array1OfPnt aPntsArray (aPntsArrayBuf[0], 1, 3); - return Overlaps (aPntsArray, Select3D_TOS_BOUNDARY, theClipRange, thePickResult); + return OverlapsPolygon (aPntsArray, Select3D_TOS_BOUNDARY, theClipRange, thePickResult); } else if (theSensType == Select3D_TOS_INTERIOR) { gp_Vec aNorm (gp_XYZ (RealLast(), RealLast(), RealLast())); - return hasOverlap (thePnt1, thePnt2, thePnt3, aNorm); + return hasTriangleOverlap (thePnt1, thePnt2, thePnt3, aNorm); } return Standard_True; diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx index aacf530652..58990520ec 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx @@ -60,45 +60,45 @@ public: // SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt, - const SelectMgr_Vec3& theMaxPnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, + const SelectMgr_Vec3& theMaxPnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Returns true if selecting volume is overlapped by axis-aligned bounding box //! with minimum corner at point theMinPt and maximum at point theMaxPt - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt, - const SelectMgr_Vec3& theMaxPt, - Standard_Boolean* theInside) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPt, + const SelectMgr_Vec3& theMaxPt, + Standard_Boolean* theInside) const Standard_OVERRIDE; //! Intersection test between defined volume and given point - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given ordered set of points, //! representing line segments. The test may be considered of interior part or //! boundary line defined by segments depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Checks if line segment overlaps selecting frustum - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! SAT intersection test between defined volume and given triangle. The test may //! be considered of interior part or boundary line defined by triangle vertices //! depending on given sensitivity type - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Nullifies the handle to corresponding builder instance to prevent memory leaks Standard_EXPORT void Clear(); diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index 977201a7ad..3e15d50dd2 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -171,20 +171,20 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::ScaleAndTransf } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const SelectMgr_Vec3& theMinPnt, - const SelectMgr_Vec3& theMaxPnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsBox (const SelectMgr_Vec3& theMinPnt, + const SelectMgr_Vec3& theMaxPnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Polyline, "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->Overlaps (theMinPnt, theMaxPnt, theClipRange, thePickResult)) + if (anIter.Value()->OverlapsBox (theMinPnt, theMaxPnt, theClipRange, thePickResult)) return Standard_True; } @@ -192,19 +192,19 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const SelectMgr_Vec3& } // ======================================================================= -// function : Overlaps +// function : OverlapsBox // purpose : // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const SelectMgr_Vec3& theMinPnt, - const SelectMgr_Vec3& theMaxPnt, - Standard_Boolean* theInside) const +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsBox (const SelectMgr_Vec3& theMinPnt, + const SelectMgr_Vec3& theMaxPnt, + Standard_Boolean* theInside) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Polyline, "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->Overlaps (theMinPnt, theMaxPnt, NULL)) + if (anIter.Value()->OverlapsBox (theMinPnt, theMaxPnt, NULL)) { if (myToAllowOverlap || theInside == NULL) { @@ -243,19 +243,19 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const SelectMgr_Vec3& } // ======================================================================= -// function : Overlaps +// function : OverlapsPoint // purpose : // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Polyline, "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->Overlaps (thePnt, theClipRange, thePickResult)) + if (anIter.Value()->OverlapsPoint (thePnt, theClipRange, thePickResult)) return Standard_True; } @@ -263,20 +263,20 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt, } // ======================================================================= -// function : Overlaps +// function : OverlapsPolygon // purpose : // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const TColgp_Array1OfPnt& theArrayOfPts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Polyline, "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->Overlaps (theArrayOfPts, theSensType, theClipRange, thePickResult)) + if (anIter.Value()->OverlapsPolygon (theArrayOfPts, theSensType, theClipRange, thePickResult)) { if (myToAllowOverlap) { @@ -302,20 +302,20 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const TColgp_Array1Of } // ======================================================================= -// function : Overlaps +// function : OverlapsSegment // purpose : // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Polyline, "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->Overlaps (thePnt1, thePnt2, theClipRange, thePickResult)) + if (anIter.Value()->OverlapsSegment (thePnt1, thePnt2, theClipRange, thePickResult)) { if (myToAllowOverlap) { @@ -336,22 +336,22 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1 } // ======================================================================= -// function : Overlaps +// function : OverlapsTriangle // purpose : // ======================================================================= -Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Polyline, "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->Overlaps (thePnt1, thePnt2, thePnt3, theSensType, theClipRange, thePickResult)) + if (anIter.Value()->OverlapsTriangle (thePnt1, thePnt2, thePnt3, theSensType, theClipRange, thePickResult)) { if (myToAllowOverlap) { diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx index 8c53e407b8..14c1f38291 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx @@ -58,35 +58,35 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt, - const SelectMgr_Vec3& theMaxPnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, + const SelectMgr_Vec3& theMaxPnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt, - const SelectMgr_Vec3& theMaxPnt, - Standard_Boolean* theInside) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, + const SelectMgr_Vec3& theMaxPnt, + Standard_Boolean* theInside) const Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPoint (const gp_Pnt& thePnt, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsSegment (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; - Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1, - const gp_Pnt& thePnt2, - const gp_Pnt& thePnt3, - Select3D_TypeOfSensitivity theSensType, - const SelectMgr_ViewClipRange& theClipRange, - SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean OverlapsTriangle (const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2, + const gp_Pnt& thePnt3, + Select3D_TypeOfSensitivity theSensType, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Calculates the point on a view ray that was detected during the run of selection algo by given depth Standard_EXPORT virtual gp_Pnt DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE; diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index a84e6c9243..6056fce00b 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -405,8 +405,8 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable SelectMgr_SelectingVolumeManager aMgr = aInversedTrsf.Form() != gp_Identity ? theMgr.ScaleAndTransform (1, aInversedTrsf, NULL) : theMgr; - if (!aMgr.Overlaps (aSensitivesTree->MinPoint (0), - aSensitivesTree->MaxPoint (0))) + if (!aMgr.OverlapsBox (aSensitivesTree->MinPoint (0), + aSensitivesTree->MaxPoint (0))) { return; } @@ -487,10 +487,10 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable { const Standard_Integer aLeftChildIdx = aSensitivesTree->Child<0> (aNode); const Standard_Integer aRightChildIdx = aSensitivesTree->Child<1> (aNode); - const Standard_Boolean isLeftChildIn = aMgr.Overlaps (aSensitivesTree->MinPoint (aLeftChildIdx), - aSensitivesTree->MaxPoint (aLeftChildIdx)); - const Standard_Boolean isRightChildIn = aMgr.Overlaps (aSensitivesTree->MinPoint (aRightChildIdx), - aSensitivesTree->MaxPoint (aRightChildIdx)); + const Standard_Boolean isLeftChildIn = aMgr.OverlapsBox (aSensitivesTree->MinPoint (aLeftChildIdx), + aSensitivesTree->MaxPoint (aLeftChildIdx)); + const Standard_Boolean isRightChildIn = aMgr.OverlapsBox (aSensitivesTree->MinPoint (aRightChildIdx), + aSensitivesTree->MaxPoint (aRightChildIdx)); if (isLeftChildIn && isRightChildIn) { @@ -680,7 +680,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives() const opencascade::handle >& aBVHTree = mySelectableObjects.BVH (aBVHSubset); Standard_Integer aNode = 0; - if (!aMgr.Overlaps (aBVHTree->MinPoint (0), aBVHTree->MaxPoint (0))) + if (!aMgr.OverlapsBox (aBVHTree->MinPoint (0), aBVHTree->MaxPoint (0))) { continue; } @@ -694,9 +694,9 @@ void SelectMgr_ViewerSelector::TraverseSensitives() const Standard_Integer aLeftChildIdx = aBVHTree->Child<0> (aNode); const Standard_Integer aRightChildIdx = aBVHTree->Child<1> (aNode); const Standard_Boolean isLeftChildIn = - aMgr.Overlaps (aBVHTree->MinPoint (aLeftChildIdx), aBVHTree->MaxPoint (aLeftChildIdx)); + aMgr.OverlapsBox (aBVHTree->MinPoint (aLeftChildIdx), aBVHTree->MaxPoint (aLeftChildIdx)); const Standard_Boolean isRightChildIn = - aMgr.Overlaps (aBVHTree->MinPoint (aRightChildIdx), aBVHTree->MaxPoint (aRightChildIdx)); + aMgr.OverlapsBox (aBVHTree->MinPoint (aRightChildIdx), aBVHTree->MaxPoint (aRightChildIdx)); if (isLeftChildIn && isRightChildIn) {