myDistToCenter (theDistToCenter) {}
public:
- inline const Standard_Real Depth() const
+ inline Standard_Real Depth() const
{
return myDepth;
}
- inline const Standard_Real DistToGeomCenter() const
+ inline Standard_Real DistToGeomCenter() const
{
return myDistToCenter;
}
virtual ~SelectBasics_SelectingVolumeManager() {};
- virtual const Standard_Integer GetActiveSelectionType() const = 0;
+ virtual Standard_Integer GetActiveSelectionType() const = 0;
//! Returns true if selecting volume is overlapped by box theBox
- virtual const Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& theDepth) = 0;
+ virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& theDepth) = 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 const Standard_Boolean Overlaps (const NCollection_Vec3<Standard_Real>& theMinPt,
- const NCollection_Vec3<Standard_Real>& theMaxPt) = 0;
+ virtual Standard_Boolean Overlaps (const NCollection_Vec3<Standard_Real>& theMinPt,
+ const NCollection_Vec3<Standard_Real>& theMaxPt) = 0;
//! Returns true if selecting volume is overlapped by point thePt
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt,
- Standard_Real& theDepth) = 0;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt,
+ Standard_Real& theDepth) = 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 const Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
- Standard_Integer theSensType,
- Standard_Real& theDepth) = 0;
+ virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
+ Standard_Integer theSensType,
+ Standard_Real& theDepth) = 0;
//! Returns true if selecting volume is overlapped by line segment with start point at thePt1
//! and end point at thePt2
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- Standard_Real& theDepth) = 0;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ Standard_Real& theDepth) = 0;
//! Returns true if selecting volume is overlapped by triangle with vertices thePt1,
//! thePt2 and thePt3, taking into account sensitivity type theSensType
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- const gp_Pnt& thePt3,
- Standard_Integer theSensType,
- Standard_Real& theDepth) = 0;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ const gp_Pnt& thePt3,
+ Standard_Integer theSensType,
+ Standard_Real& theDepth) = 0;
//! Calculates distance from 3d projection of user-defined selection point
//! to the given point theCOG
- virtual const Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) = 0;
+ virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) = 0;
virtual NCollection_Vec3<Standard_Real> DetectedPoint (const Standard_Real theDepth) const = 0;
// purpose : SAT intersection test between defined volume and
// given axis-aligned box
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const BVH_Box<Standard_Real, 3>& /*theBndBox*/,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const BVH_Box<Standard_Real, 3>& /*theBndBox*/,
+ Standard_Real& /*theDepth*/)
{
return Standard_False;
}
// function : Overlaps
// purpose : Intersection test between defined volume and given point
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const SelectMgr_Vec3& /*theMinPt*/,
- const SelectMgr_Vec3& /*theMaxPt*/)
+Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const SelectMgr_Vec3& /*theMinPt*/,
+ const SelectMgr_Vec3& /*theMaxPt*/)
{
return Standard_False;
}
// function : Overlaps
// purpose : Intersection test between defined volume and given point
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt*/,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt*/,
+ Standard_Real& /*theDepth*/)
{
return Standard_False;
}
// may be considered of interior part or boundary line defined
// by segments depending on given sensitivity type
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const Handle(TColgp_HArray1OfPnt)& /*theArrayOfPts*/,
- Select3D_TypeOfSensitivity /*theSensType*/,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const Handle(TColgp_HArray1OfPnt)& /*theArrayOfPts*/,
+ Select3D_TypeOfSensitivity /*theSensType*/,
+ Standard_Real& /*theDepth*/)
{
return Standard_False;
}
// boundary line defined by triangle vertices depending on
// given sensitivity type
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt1*/,
- const gp_Pnt& /*thePt2*/,
- const gp_Pnt& /*thePt3*/,
- Select3D_TypeOfSensitivity /*theSensType*/,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt1*/,
+ const gp_Pnt& /*thePt2*/,
+ const gp_Pnt& /*thePt3*/,
+ Select3D_TypeOfSensitivity /*theSensType*/,
+ Standard_Real& /*theDepth*/)
{
return Standard_False;
}
// function : Overlaps
// purpose : Checks if line segment overlaps selecting volume
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt1*/,
- const gp_Pnt& /*thePt2*/,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_BaseFrustum::Overlaps (const gp_Pnt& /*thePt1*/,
+ const gp_Pnt& /*thePt2*/,
+ Standard_Real& /*theDepth*/)
{
return Standard_False;
}
// purpose : Measures distance between 3d projection of user-picked
// screen point and given point theCOG
//=======================================================================
-const Standard_Real SelectMgr_BaseFrustum::DistToGeometryCenter (const gp_Pnt& /*theCOG*/)
+Standard_Real SelectMgr_BaseFrustum::DistToGeometryCenter (const gp_Pnt& /*theCOG*/)
{
return DBL_MAX;
}
// purpose : Checks if the point of sensitive in which selection was
// detected belongs to the region defined by clipping planes
//=======================================================================
-const Standard_Boolean SelectMgr_BaseFrustum::IsClipped (const Graphic3d_SequenceOfHClipPlane& /*thePlanes*/,
- const Standard_Real /*theDepth*/)
+Standard_Boolean SelectMgr_BaseFrustum::IsClipped (const Graphic3d_SequenceOfHClipPlane& /*thePlanes*/,
+ const Standard_Real /*theDepth*/)
{
return Standard_True;
}
virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& /*theTrsf*/) { return NULL; }
//! SAT intersection test between defined volume and given axis-aligned box
- virtual const Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
- Standard_Real& theDepth);
+ virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
+ Standard_Real& theDepth);
//! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt
- virtual const Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
- const SelectMgr_Vec3& theMaxPt);
+ virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
+ const SelectMgr_Vec3& theMaxPt);
//! Intersection test between defined volume and given point
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt,
- Standard_Real& theDepth);
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt,
+ Standard_Real& theDepth);
//! 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
- virtual const Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth);
+ virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth);
//! Checks if line segment overlaps selecting frustum
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- Standard_Real& theDepth);
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ Standard_Real& theDepth);
//! 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
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- const gp_Pnt& thePt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth);
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ const gp_Pnt& thePt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth);
//! Measures distance between 3d projection of user-picked
//! screen point and given point theCOG
- virtual const Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG);
+ virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG);
virtual SelectMgr_Vec3 DetectedPoint (const Standard_Real theDepth) const;
//! Checks if the point of sensitive in which selection was detected belongs
//! to the region defined by clipping planes
- virtual const Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
- const Standard_Real theDepth);
+ virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
+ const Standard_Real theDepth);
protected:
Standard_Real myPixelTolerance; //!< Pixel tolerance
//! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt
- const Standard_Boolean hasOverlap (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt);
+ Standard_Boolean hasOverlap (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt);
//! SAT intersection test between defined volume and given point
- const Standard_Boolean hasOverlap (const gp_Pnt& thePnt);
+ Standard_Boolean hasOverlap (const gp_Pnt& thePnt);
//! SAT intersection test between defined volume and given segment
- const Standard_Boolean hasOverlap (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2);
+ Standard_Boolean hasOverlap (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2);
//! SAT intersection test between frustum given and planar convex polygon represented as ordered point set
- const Standard_Boolean hasOverlap (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
- SelectMgr_Vec3& theNormal);
+ Standard_Boolean hasOverlap (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
+ SelectMgr_Vec3& theNormal);
//! SAT intersection test between defined volume and given triangle
- const Standard_Boolean hasOverlap (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- SelectMgr_Vec3& theNormal);
+ Standard_Boolean hasOverlap (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ SelectMgr_Vec3& theNormal);
private:
// theMinPnt and maximum at point theMaxPnt
// =======================================================================
template <int N>
-const Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt)
+Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt)
{
// E0 test
if (theMinPnt.x() > myMaxOrthoVertsProjections[0]
// purpose : SAT intersection test between defined volume and given point
// =======================================================================
template <int N>
-const Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt)
+Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt)
{
SelectMgr_Vec3 aPnt (thePnt.X(), thePnt.Y(), thePnt.Z());
// purpose : SAT intersection test between defined volume and given segment
// =======================================================================
template <int N>
-const Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& theStartPnt,
- const gp_Pnt& theEndPnt)
+Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& theStartPnt,
+ const gp_Pnt& theEndPnt)
{
const SelectMgr_Vec3& aDir = SelectMgr_Vec3 (theEndPnt.X() - theStartPnt.X(),
theEndPnt.Y() - theStartPnt.Y(),
// polygon represented as ordered point set
// =======================================================================
template <int N>
-const Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
- SelectMgr_Vec3& theNormal)
+Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
+ SelectMgr_Vec3& theNormal)
{
Standard_Integer aStartIdx = theArrayOfPnts->Lower();
Standard_Integer anEndIdx = theArrayOfPnts->Upper();
// purpose : SAT intersection test between defined volume and given triangle
// =======================================================================
template <int N>
-const Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- SelectMgr_Vec3& theNormal)
+Standard_Boolean SelectMgr_Frustum<N>::hasOverlap (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ SelectMgr_Vec3& theNormal)
{
SelectMgr_Vec3 aPnt1 (thePnt1.X(), thePnt1.Y(), thePnt1.Z());
// axis-aligned bounding box with minimum corner at point
// theMinPnt and maximum at point theMaxPnt
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt)
+Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt)
{
return hasOverlap (theMinPnt, theMaxPnt);
}
// purpose : SAT intersection test between defined volume and
// given axis-aligned box
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& theDepth)
{
const SelectMgr_Vec3& aMinPnt = theBox.CornerMin();
const SelectMgr_Vec3& aMaxPnt = theBox.CornerMax();
// function : Overlaps
// purpose : Intersection test between defined volume and given point
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt,
+ Standard_Real& theDepth)
{
if (!hasOverlap (thePnt))
return Standard_False;
// function : Overlaps
// purpose : Checks if line segment overlaps selecting frustum
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ Standard_Real& theDepth)
{
theDepth = -DBL_MAX;
if (!hasOverlap (thePnt1, thePnt2))
// may be considered of interior part or boundary line defined
// by segments depending on given sensitivity type
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth)
{
if (theSensType == Select3D_TOS_BOUNDARY)
{
// boundary line defined by triangle vertices depending on
// given sensitivity type
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth)
{
if (theSensType == Select3D_TOS_BOUNDARY)
{
// purpose : Measures distance between 3d projection of user-picked
// screen point and given point theCOG
// =======================================================================
-const Standard_Real SelectMgr_RectangularFrustum::DistToGeometryCenter (const gp_Pnt& theCOG)
+Standard_Real SelectMgr_RectangularFrustum::DistToGeometryCenter (const gp_Pnt& theCOG)
{
const SelectMgr_Vec3& aCOG = SelectMgr_Vec3 (theCOG.X(), theCOG.Y(), theCOG.Z());
return DISTANCE (aCOG, myNearPickedPnt);
// purpose : Checks if the point of sensitive in which selection was
// detected belongs to the region defined by clipping planes
// =======================================================================
-const Standard_Boolean SelectMgr_RectangularFrustum::IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
- const Standard_Real theDepth)
+Standard_Boolean SelectMgr_RectangularFrustum::IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
+ const Standard_Real theDepth)
{
Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (thePlanes);
Standard_Real aMaxDepth = DBL_MAX;
// SAT Tests for different objects
//! SAT intersection test between defined volume and given axis-aligned box
- virtual const Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& theDepth) 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
- virtual const Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt) Standard_OVERRIDE;
//! Intersection test between defined volume and given point
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePnt,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt,
+ Standard_Real& theDepth) 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
- virtual const Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
//! Checks if line segment overlaps selecting frustum
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ Standard_Real& theDepth) 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
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
//! Measures distance between 3d projection of user-picked
//! screen point and given point theCOG
- virtual const Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE;
+ virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE;
//! Calculates the point on a view ray that was detected during the run of selection algo by given depth
virtual SelectMgr_Vec3 DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE;
//! Checks if the point of sensitive in which selection was detected belongs
//! to the region defined by clipping planes
- virtual const Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
- const Standard_Real theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
+ const Standard_Real theDepth) Standard_OVERRIDE;
protected:
// function : Contains
// purpose : Returns true if this objects set contains theObject given
//=======================================================================
-const Standard_Boolean SelectMgr_SelectableObjectSet::Contains (const Handle(SelectMgr_SelectableObject)& theObject) const
+Standard_Boolean SelectMgr_SelectableObjectSet::Contains (const Handle(SelectMgr_SelectableObject)& theObject) const
{
for (Standard_Integer anObjectIdx = 1; anObjectIdx <= myObjects.Size(); ++anObjectIdx)
{
const Handle(SelectMgr_SelectableObject)& GetObjectById (const Standard_Integer theIndex) const;
//! Returns true if this objects set contains theObject given
- const Standard_Boolean Contains (const Handle(SelectMgr_SelectableObject)& theObject) const;
+ Standard_Boolean Contains (const Handle(SelectMgr_SelectableObject)& theObject) const;
private:
// function : GetActiveSelectionType
// purpose :
//=======================================================================
-const Standard_Integer SelectMgr_SelectingVolumeManager::GetActiveSelectionType() const
+Standard_Integer SelectMgr_SelectingVolumeManager::GetActiveSelectionType() const
{
return myActiveSelectionType;
}
// purpose : SAT intersection test between defined volume and
// given axis-aligned box
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
+ Standard_Real& theDepth)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// function : Overlaps
// purpose : Intersection test between defined volume and given point
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const SelectMgr_Vec3& theMinPt,
- const SelectMgr_Vec3& theMaxPt)
+Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const SelectMgr_Vec3& theMinPt,
+ const SelectMgr_Vec3& theMaxPt)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// function : Overlaps
// purpose : Intersection test between defined volume and given point
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt,
+ Standard_Real& theDepth)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// may be considered of interior part or boundary line defined
// by segments depending on given sensitivity type
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
- Standard_Integer theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
+ Standard_Integer theSensType,
+ Standard_Real& theDepth)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// function : Overlaps
// purpose : Checks if line segment overlaps selecting volume
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ Standard_Real& theDepth)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// boundary line defined by triangle vertices depending on
// given sensitivity type
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- const gp_Pnt& thePt3,
- Standard_Integer theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_SelectingVolumeManager::Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ const gp_Pnt& thePt3,
+ Standard_Integer theSensType,
+ Standard_Real& theDepth)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// purpose : Measures distance between 3d projection of user-picked
// screen point and given point theCOG
//=======================================================================
-const Standard_Real SelectMgr_SelectingVolumeManager::DistToGeometryCenter (const gp_Pnt& theCOG)
+Standard_Real SelectMgr_SelectingVolumeManager::DistToGeometryCenter (const gp_Pnt& theCOG)
{
if (myActiveSelectionType == Unknown)
return Standard_False;
// purpose : Checks if the point of sensitive in which selection was
// detected belongs to the region defined by clipping planes
//=======================================================================
-const Standard_Boolean SelectMgr_SelectingVolumeManager::IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
- const Standard_Real& theDepth)
+Standard_Boolean SelectMgr_SelectingVolumeManager::IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
+ const Standard_Real& theDepth)
{
if (myActiveSelectionType == Point)
return Standard_False;
//! Returns a copy of active frustum transformed according to the matrix given
Standard_EXPORT virtual SelectMgr_SelectingVolumeManager Transform (const gp_Trsf& theTrsf);
- Standard_EXPORT virtual const Standard_Integer GetActiveSelectionType() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Integer GetActiveSelectionType() const Standard_OVERRIDE;
Standard_EXPORT void SetActiveSelectionType (const SelectionType& theType);
//! SAT intersection test between defined volume and given axis-aligned box
- Standard_EXPORT virtual const Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBndBox,
+ Standard_Real& theDepth) 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 const Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
- const SelectMgr_Vec3& theMaxPt) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
+ const SelectMgr_Vec3& theMaxPt) Standard_OVERRIDE;
//! Intersection test between defined volume and given point
- Standard_EXPORT virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt,
+ Standard_Real& theDepth) 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 const Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
- Standard_Integer theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
+ Standard_Integer theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
//! Checks if line segment overlaps selecting frustum
- Standard_EXPORT virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ Standard_Real& theDepth) 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 const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- const gp_Pnt& thePt3,
- Standard_Integer theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ const gp_Pnt& thePt3,
+ Standard_Integer theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
//! Measures distance between 3d projection of user-picked
//! screen point and given point theCOG
- Standard_EXPORT virtual const Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE;
//! Calculates the point on a view ray that was detected during the run of selection algo by given depth. Is valid for point
//! selection only
//! Checks if the point of sensitive in which selection was detected belongs
//! to the region defined by clipping planes
- Standard_EXPORT virtual const Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
- const Standard_Real& theDepth);
+ Standard_EXPORT virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
+ const Standard_Real& theDepth);
private:
enum { Frustum, FrustumSet, VolumeTypesNb }; //!< Defines the amount of available selecting volumes
{
for (Standard_Integer anEntityIdx = 0; anEntityIdx < myEntities.Size(); ++anEntityIdx)
{
- SelectMgr_HSensitiveEntity& anEntity = myEntities.ChangeValue (anEntityIdx);
+ Handle(SelectMgr_SensitiveEntity)& anEntity = myEntities.ChangeValue (anEntityIdx);
anEntity->BaseSensitive()->Set (NULL);
}
mySensFactor = 2.0;
// in release mode do not add
if (!theSensitive.IsNull())
{
- SelectMgr_HSensitiveEntity anEntity = new SelectMgr_SensitiveEntity (theSensitive);
+ Handle(SelectMgr_SensitiveEntity) anEntity = new SelectMgr_SensitiveEntity (theSensitive);
myEntities.Append (anEntity);
if (mySelectionState == SelectMgr_SOS_Activated &&
!anEntity->IsActiveForSelection())
{
for (Standard_Integer anIdx = 0; anIdx < myEntities.Size(); ++anIdx)
{
- SelectMgr_HSensitiveEntity& anEntity = myEntities.ChangeValue (anIdx);
+ Handle(SelectMgr_SensitiveEntity)& anEntity = myEntities.ChangeValue (anIdx);
anEntity->Clear();
}
// purpose : Returns sensitive entity stored by
// index theIdx in entites vector
//==================================================
-SelectMgr_HSensitiveEntity& SelectMgr_Selection::GetEntityById (const Standard_Integer theIdx)
+Handle(SelectMgr_SensitiveEntity)& SelectMgr_Selection::GetEntityById (const Standard_Integer theIdx)
{
return myEntities.ChangeValue (theIdx);
}
// function: Sensitivity
// purpose : Returns sensitivity of the selection
//==================================================
-const Standard_Real SelectMgr_Selection::Sensitivity() const
+Standard_Real SelectMgr_Selection::Sensitivity() const
{
return mySensFactor;
}
#ifndef _SelectMgr_Selection_HeaderFile
#define _SelectMgr_Selection_HeaderFile
-#include <NCollection_Handle.hxx>
#include <NCollection_Vector.hxx>
#include <Standard.hxx>
class Standard_NullObject;
class SelectBasics_SensitiveEntity;
-typedef NCollection_Handle<SelectMgr_SensitiveEntity> SelectMgr_HSensitiveEntity;
-
//! Represents the state of a given selection mode for a
//! Selectable Object. Contains all the sensitive entities available for this mode.
//! An interactive object can have an indefinite number of
void Next();
//! Returns any sensitive primitive in this framework.
- const SelectMgr_HSensitiveEntity& Sensitive() const;
+ const Handle(SelectMgr_SensitiveEntity)& Sensitive() const;
//! Returns the flag UpdateFlag.
//! This flage gives the update status of this framework
Standard_EXPORT void SetSelectionState (const SelectMgr_StateOfSelection theState) const;
//! Returns sensitivity of the selection
- Standard_EXPORT const Standard_Real Sensitivity() const;
+ Standard_EXPORT Standard_Real Sensitivity() const;
DEFINE_STANDARD_RTTI (SelectMgr_Selection)
protected:
//! Returns sensitive entity stored by index theIdx in entites vector
- SelectMgr_HSensitiveEntity& GetEntityById (const Standard_Integer theIdx);
+ Handle(SelectMgr_SensitiveEntity)& GetEntityById (const Standard_Integer theIdx);
private:
- NCollection_Vector<SelectMgr_HSensitiveEntity> myEntities;
- NCollection_Vector<SelectMgr_HSensitiveEntity>::Iterator myEntityIter;
- Standard_Integer myMode;
- SelectMgr_TypeOfUpdate myUpdateStatus;
- mutable SelectMgr_StateOfSelection mySelectionState;
- mutable SelectMgr_TypeOfBVHUpdate myBVHUpdateStatus;
- Standard_Real mySensFactor;
+ NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> myEntities;
+ NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator myEntityIter;
+ Standard_Integer myMode;
+ SelectMgr_TypeOfUpdate myUpdateStatus;
+ mutable SelectMgr_StateOfSelection mySelectionState;
+ mutable SelectMgr_TypeOfBVHUpdate myBVHUpdateStatus;
+ Standard_Real mySensFactor;
};
DEFINE_STANDARD_HANDLE(SelectMgr_Selection, MMgt_TShared)
// function : Sensitive
// purpose :
// =======================================================================
-inline const SelectMgr_HSensitiveEntity& SelectMgr_Selection::Sensitive() const
+inline const Handle(SelectMgr_SensitiveEntity)& SelectMgr_Selection::Sensitive() const
{
return myEntityIter.Value();
}
#include <SelectMgr_SensitiveEntity.hxx>
+IMPLEMENT_STANDARD_HANDLE (SelectMgr_SensitiveEntity, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntity, Standard_Transient)
+
//=======================================================================
// function : SelectMgr_SensitiveEntity
// purpose : Creates new inactive for selection object with base entity
// purpose : Returns true if this entity belongs to the active selection
// mode of parent object
//=======================================================================
-const Standard_Boolean SelectMgr_SensitiveEntity::IsActiveForSelection() const
+Standard_Boolean SelectMgr_SensitiveEntity::IsActiveForSelection() const
{
return myIsActiveForSelection;
}
#include <SelectBasics_SensitiveEntity.hxx>
#include <Handle_SelectBasics_SensitiveEntity.hxx>
+#include <Standard.hxx>
+#include <Standard_DefineHandle.hxx>
//! The purpose of this class is to mark sensitive entities selectable or not
//! depending on current active selection of parent object for proper BVH traverse
-class SelectMgr_SensitiveEntity
+class SelectMgr_SensitiveEntity : public Standard_Transient
{
public:
//! Returns true if this entity belongs to the active selection
//! mode of parent object
- const Standard_Boolean IsActiveForSelection() const;
+ Standard_Boolean IsActiveForSelection() const;
//! Marks entity as inactive for selection
Standard_EXPORT void ResetSelectionActiveStatus() const;
//! Marks entity as active for selection
Standard_EXPORT void SetActiveForSelection() const;
+ DEFINE_STANDARD_RTTI(SelectMgr_SensitiveEntity) // Type definition
+
private:
Handle(SelectBasics_SensitiveEntity) mySensitive; //!< Related SelectBasics entity
- mutable Standard_Boolean myIsActiveForSelection; //!< Selection activity status
+ mutable Standard_Boolean myIsActiveForSelection; //!< Selection activity status
};
+DEFINE_STANDARD_HANDLE(SelectMgr_SensitiveEntity, Standard_Transient)
+
#endif // _SelectMgr_SensitiveEntity_HeaderFile
// function : Append
// purpose : Adds new entity to the set and marks BVH tree for rebuild
//=======================================================================
-void SelectMgr_SensitiveEntitySet::Append (const SelectMgr_HSensitiveEntity& theEntity)
+void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntity)& theEntity)
{
if (!theEntity->BaseSensitive()->IsKind ("Select3D_SensitiveEntity"))
{
// function : Remove
// purpose : Removes entity from the set and marks BVH tree for rebuild
//=======================================================================
-void SelectMgr_SensitiveEntitySet::Remove (const SelectMgr_HSensitiveEntity& theEntity)
+void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_SensitiveEntity)& theEntity)
{
for (Standard_Integer anEntityIdx = 1; anEntityIdx <= myEntities.Size(); ++anEntityIdx)
{
// function : GetSensitiveById
// purpose : Returns the entity with index theIndex in the set
//=======================================================================
-const SelectMgr_HSensitiveEntity& SelectMgr_SensitiveEntitySet::GetSensitiveById
+const Handle(SelectMgr_SensitiveEntity)& SelectMgr_SensitiveEntitySet::GetSensitiveById
(const Standard_Integer theIndex) const
{
Standard_Integer anIdx = myEntityIdxs.Value (theIndex + 1);
virtual ~SelectMgr_SensitiveEntitySet() {};
//! Adds new entity to the set and marks BVH tree for rebuild
- void Append (const SelectMgr_HSensitiveEntity& theEntity);
+ void Append (const Handle(SelectMgr_SensitiveEntity)& theEntity);
//! Adds every entity of selection theSelection to the set and marks
//! BVH tree for rebuild
void Append (const Handle(SelectMgr_Selection)& theSelection);
//! Removes entity from the set and marks BVH tree for rebuild
- void Remove (const SelectMgr_HSensitiveEntity& theEntity);
+ void Remove (const Handle(SelectMgr_SensitiveEntity)& theEntity);
//! Removes every entity of selection theSelection from the set
//! and marks BVH tree for rebuild
virtual Standard_Integer Size() const Standard_OVERRIDE;
//! Returns the entity with index theIndex in the set
- const SelectMgr_HSensitiveEntity& GetSensitiveById (const Standard_Integer theIndex) const;
+ const Handle(SelectMgr_SensitiveEntity)& GetSensitiveById (const Standard_Integer theIndex) const;
private:
- NCollection_Sequence<SelectMgr_HSensitiveEntity> myEntities; //!< A sequence of calculated sensitives of the object
- NCollection_Sequence<Standard_Integer> myEntityIdxs; //!< Cached indexes for faster BVH build
+ NCollection_Sequence<Handle(SelectMgr_SensitiveEntity)> myEntities; //!< A sequence of calculated sensitives of the object
+ NCollection_Sequence<Standard_Integer> myEntityIdxs; //!< Cached indexes for faster BVH build
};
#endif // _SelectMgr_SensitiveEntitySet_HeaderFile
// purpose : SAT intersection test between defined volume and
// given axis-aligned box
//=======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& /*theDepth*/)
{
return hasOverlap (theBox.CornerMin(), theBox.CornerMax());
}
// axis-aligned bounding box with minimum corner at point
// theMinPt and maximum at point theMaxPt
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const SelectMgr_Vec3& theMinPt,
- const SelectMgr_Vec3& theMaxPt)
+Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const SelectMgr_Vec3& theMinPt,
+ const SelectMgr_Vec3& theMaxPt)
{
return hasOverlap (theMinPt, theMaxPt);
}
// function : Overlaps
// purpose : Intersection test between defined volume and given point
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt,
+ Standard_Real& /*theDepth*/)
{
return hasOverlap (thePnt);
}
// may be considered of interior part or boundary line defined
// by segments depending on given sensitivity type
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& /*theDepth*/)
{
if (theSensType == Select3D_TOS_BOUNDARY)
{
// function : Overlaps
// purpose : Checks if line segment overlaps selecting frustum
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- Standard_Real& /*theDepth*/)
+Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ Standard_Real& /*theDepth*/)
{
return hasOverlap (thePnt1, thePnt2);
}
// boundary line defined by triangle vertices depending on
// given sensitivity type
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_TriangularFrustum::Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth)
{
if (theSensType == Select3D_TOS_BOUNDARY)
{
// SAT Tests for different objects
//! SAT intersection test between defined volume and given axis-aligned box
- virtual const Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& theDepth) 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
- virtual const Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
- const SelectMgr_Vec3& theMaxPt) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPt,
+ const SelectMgr_Vec3& theMaxPt) Standard_OVERRIDE;
//! Intersection test between defined volume and given point
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePnt,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt,
+ Standard_Real& theDepth) 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
- virtual const Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPnts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
//! Checks if line segment overlaps selecting frustum
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ Standard_Real& theDepth) 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
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
//! Nullifies the handle to corresponding builder instance to prevent memory leaks
void Clear();
// function : Overlaps
// purpose :
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& theDepth)
{
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
{
// function : Overlaps
// purpose :
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt)
+Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt)
{
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
{
// function : Overlaps
// purpose :
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt,
+ Standard_Real& theDepth)
{
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
{
// function : Overlaps
// purpose :
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth)
{
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
{
// function : Overlaps
// purpose :
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ Standard_Real& theDepth)
{
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
{
// function : Overlaps
// purpose :
// =======================================================================
-const Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1,
- const gp_Pnt& thePnt2,
- const gp_Pnt& thePnt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth)
+Standard_Boolean SelectMgr_TriangularFrustumSet::Overlaps (const gp_Pnt& thePnt1,
+ const gp_Pnt& thePnt2,
+ const gp_Pnt& thePnt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth)
{
for (SelectMgr_TriangFrustumsIter anIter (myFrustums); anIter.More(); anIter.Next())
{
//! Returns a copy of the frustum with all sub-volumes transformed according to the matrix given
virtual NCollection_Handle<SelectMgr_BaseFrustum> Transform (const gp_Trsf& theTrsf) Standard_OVERRIDE;
- virtual const Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const BVH_Box<Standard_Real, 3>& theBox,
+ Standard_Real& theDepth) Standard_OVERRIDE;
- virtual const Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt,
- const SelectMgr_Vec3& theMaxPnt) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theMinPnt,
+ const SelectMgr_Vec3& theMaxPnt) Standard_OVERRIDE;
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt,
+ Standard_Real& theDepth) Standard_OVERRIDE;
- virtual const Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ Standard_Real& theDepth) Standard_OVERRIDE;
- virtual const Standard_Boolean Overlaps (const gp_Pnt& thePt1,
- const gp_Pnt& thePt2,
- const gp_Pnt& thePt3,
- Select3D_TypeOfSensitivity theSensType,
- Standard_Real& theDepth) Standard_OVERRIDE;
+ virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
+ const gp_Pnt& thePt2,
+ const gp_Pnt& thePt3,
+ Select3D_TypeOfSensitivity theSensType,
+ Standard_Real& theDepth) Standard_OVERRIDE;
private:
}
}
-const Standard_Real SelectMgr_ToleranceMap::Largest()
+Standard_Real SelectMgr_ToleranceMap::Largest()
{
return myLargestKey;
}
Standard_Integer anEndIdx = aSensitivesTree->EndPrimitive (aNode);
for (Standard_Integer anIdx = aStartIdx; anIdx <= anEndIdx; ++anIdx)
{
- const SelectMgr_HSensitiveEntity& aSensitive =
+ const Handle(SelectMgr_SensitiveEntity)& aSensitive =
anEntitySet->GetSensitiveById (anIdx);
if (aSensitive->IsActiveForSelection())
{
Standard_EXPORT void Decrement (const Standard_Real& theTolerance);
- Standard_EXPORT const Standard_Real Largest();
+ Standard_EXPORT Standard_Real Largest();
private:
NCollection_DataMap<Standard_Real, Standard_Integer> myTolerances;