}
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));
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;
}
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;
}
else if (mySelMethod == MeshVS_MSM_NODES)
{
const gp_Pnt aVert = getVertexByIndex (anItemIdx);
- return theMgr.Overlaps (aVert);
+ return theMgr.OverlapsPoint (aVert);
}
return Standard_False;
}
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);
}
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;
}
// 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;
}
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);
}
// =======================================================================
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;
}
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;
}
return Standard_True;
}
- if (!theMgr.Overlaps (anArrayOfPnt, Select3D_TOS_INTERIOR, thePickResult))
+ if (!theMgr.OverlapsPolygon (anArrayOfPnt, Select3D_TOS_INTERIOR, thePickResult))
{
return Standard_False;
}
Standard_Boolean Select3D_SensitivePoint::Matches (SelectBasics_SelectingVolumeManager& theMgr,
SelectBasics_PickResult& thePickResult)
{
- if (!theMgr.Overlaps (myPoint, thePickResult))
+ if (!theMgr.OverlapsPoint (myPoint, thePickResult))
{
return Standard_False;
}
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);
}
//==================================================
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));
}
//==================================================
if (myToDetectNode
|| myToDetectElem)
{
- if (theIsFullInside || theMgr.Overlaps (aPoint, aPickResult))
+ if (theIsFullInside || theMgr.OverlapsPoint (aPoint, aPickResult))
{
if (aPickResult.Depth() <= myMinDepthNode)
{
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)
{
{
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)
{
{
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)
{
{
aPoint = vecToPnt (getPosVec2 (aPointIndex));
}
- if (!theIsFullInside && !theMgr.Overlaps (aPoint))
+ if (!theIsFullInside && !theMgr.OverlapsPoint (aPoint))
{
return Standard_False;
}
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;
}
{
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;
}
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;
}
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;
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;
}
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;
}
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
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);
}
}
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
{
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);
}
}
virtual Standard_Integer GetActiveSelectionType() const = 0;
//! Returns true if selecting volume is overlapped by box theBox
- virtual Standard_Boolean Overlaps (const NCollection_Vec3<Standard_Real>& theBoxMin,
- const NCollection_Vec3<Standard_Real>& theBoxMax,
- SelectBasics_PickResult& thePickResult) const = 0;
+ virtual Standard_Boolean OverlapsBox (const NCollection_Vec3<Standard_Real>& theBoxMin,
+ const NCollection_Vec3<Standard_Real>& 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<Standard_Real>& theBoxMin,
- const NCollection_Vec3<Standard_Real>& theBoxMax,
- Standard_Boolean* theInside = NULL) const = 0;
+ virtual Standard_Boolean OverlapsBox (const NCollection_Vec3<Standard_Real>& theBoxMin,
+ const NCollection_Vec3<Standard_Real>& 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
}
// =======================================================================
-// 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");
}
// =======================================================================
-// 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");
}
// =======================================================================
-// 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");
}
// =======================================================================
-// 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");
}
// =======================================================================
-// 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");
}
// =======================================================================
-// 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");
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))
{
}
// =======================================================================
-// 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");
{
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)
{
{
// 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};
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:
}
//=======================================================================
-// 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;
}
//! 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;
}
//=======================================================================
-// 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;
}
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:
//! 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:
}
// =======================================================================
-// 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 <int N>
-Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt,
- Standard_Boolean* theInside) const
+Standard_Boolean SelectMgr_Frustum<N>::hasBoxOverlap (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt,
+ Standard_Boolean* theInside) const
{
for (Standard_Integer anAxis = 0; anAxis < 3; ++anAxis)
{
}
// =======================================================================
-// function : hasOverlap
+// function : hasPointOverlap
// purpose : SAT intersection test between defined volume and given point
// =======================================================================
template <int N>
-Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt) const
+Standard_Boolean SelectMgr_Frustum<N>::hasPointOverlap (const gp_Pnt& thePnt) const
{
const Standard_Integer anIncFactor = (myIsOrthographic && N == 4) ? 2 : 1;
}
// =======================================================================
-// function : hasOverlap
+// function : hasSegmentOverlap
// purpose : SAT intersection test between defined volume and given segment
// =======================================================================
template <int N>
-Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& theStartPnt,
- const gp_Pnt& theEndPnt) const
+Standard_Boolean SelectMgr_Frustum<N>::hasSegmentOverlap (const gp_Pnt& theStartPnt,
+ const gp_Pnt& theEndPnt) const
{
const gp_XYZ& aDir = theEndPnt.XYZ() - theStartPnt.XYZ();
if (aDir.Modulus() < Precision::Confusion())
}
// =======================================================================
-// function : hasOverlap
+// function : hasPolygonOverlap
// purpose : SAT intersection test between frustum given and planar convex
// polygon represented as ordered point set
// =======================================================================
template <int N>
-Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const TColgp_Array1OfPnt& theArrayOfPnts,
- gp_Vec& theNormal) const
+Standard_Boolean SelectMgr_Frustum<N>::hasPolygonOverlap (const TColgp_Array1OfPnt& theArrayOfPnts,
+ gp_Vec& theNormal) const
{
Standard_Integer aStartIdx = theArrayOfPnts.Lower();
Standard_Integer anEndIdx = theArrayOfPnts.Upper();
}
// =======================================================================
-// function : hasOverlap
+// function : hasTriangleOverlap
// purpose : SAT intersection test between defined volume and given triangle
// =======================================================================
template <int N>
-Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- gp_Vec& theNormal) const
+Standard_Boolean SelectMgr_Frustum<N>::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(),
}
// =======================================================================
-// 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;
}
// =======================================================================
-// 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();
}
// =======================================================================
-// 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);
}
// =======================================================================
-// 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");
{
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);
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;
}
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))
{
}
// =======================================================================
-// 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");
{
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;
}
{
// 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};
// 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.
}
//=======================================================================
-// 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);
}
//=======================================================================
//! 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
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
}
//=======================================================================
-// 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)
{
{
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;
}
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;
// 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();
}
// =======================================================================
-// 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;
}
}
// =======================================================================
-// 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)
{
}
// =======================================================================
-// 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;
}
}
// =======================================================================
-// 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)
{
}
// =======================================================================
-// 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)
{
}
// =======================================================================
-// 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)
{
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 Overlaps (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 Overlaps (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 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 OverlapsBox (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,
+ Standard_Boolean* theInside) 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 OverlapsPolygon (const TColgp_Array1OfPnt& theArrayOfPnts,
+ Select3D_TypeOfSensitivity theSensType,
+ 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 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;
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;
}
{
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)
{
const opencascade::handle<BVH_Tree<Standard_Real, 3> >& 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;
}
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)
{