File indexing completed on 2025-01-18 10:04:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _Select3D_SensitiveSphere_HeaderFile
0017 #define _Select3D_SensitiveSphere_HeaderFile
0018
0019 #include <Select3D_SensitiveEntity.hxx>
0020
0021
0022 class Select3D_SensitiveSphere : public Select3D_SensitiveEntity
0023 {
0024 DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveSphere, Select3D_SensitiveEntity)
0025 public:
0026
0027
0028
0029 Standard_EXPORT Select3D_SensitiveSphere (const Handle(SelectMgr_EntityOwner)& theOwnerId,
0030 const gp_Pnt& theCenter,
0031 const Standard_Real theRadius);
0032
0033
0034 Standard_Real Radius() const { return myRadius; }
0035
0036 public:
0037
0038
0039 Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
0040 SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
0041
0042
0043 Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
0044
0045
0046
0047 Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
0048
0049
0050 virtual Standard_Boolean ToBuildBVH() const Standard_OVERRIDE { return Standard_False; }
0051
0052
0053 virtual Standard_Integer NbSubElements() const Standard_OVERRIDE { return 1; }
0054
0055
0056 virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE { return myCenter; };
0057
0058
0059 const gp_Pnt& LastDetectedPoint() const { return myLastDetectedPoint; }
0060
0061
0062 void ResetLastDetectedPoint()
0063 {
0064 myLastDetectedPoint = gp_Pnt (RealLast(), RealLast(), RealLast());
0065 }
0066
0067 protected:
0068 gp_Pnt myCenter;
0069 gp_Pnt myLastDetectedPoint;
0070 Standard_Real myRadius;
0071 };
0072
0073 #endif