File indexing completed on 2026-09-20 09:18:52
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 Standard_EXPORT Select3D_SensitiveSphere(const occ::handle<SelectMgr_EntityOwner>& theOwnerId,
0029 const gp_Pnt& theCenter,
0030 const double theRadius);
0031
0032
0033 double Radius() const { return myRadius; }
0034
0035 public:
0036
0037 Standard_EXPORT bool Matches(SelectBasics_SelectingVolumeManager& theMgr,
0038 SelectBasics_PickResult& thePickResult) override;
0039
0040
0041 Standard_EXPORT occ::handle<Select3D_SensitiveEntity> GetConnected() override;
0042
0043
0044
0045 Standard_EXPORT Select3D_BndBox3d BoundingBox() override;
0046
0047
0048 bool ToBuildBVH() const override { return false; }
0049
0050
0051 int NbSubElements() const override { return 1; }
0052
0053
0054 gp_Pnt CenterOfGeometry() const override { return myCenter; };
0055
0056
0057 const gp_Pnt& LastDetectedPoint() const { return myLastDetectedPoint; }
0058
0059
0060 void ResetLastDetectedPoint()
0061 {
0062 myLastDetectedPoint = gp_Pnt(RealLast(), RealLast(), RealLast());
0063 }
0064
0065 protected:
0066 gp_Pnt myCenter;
0067 gp_Pnt myLastDetectedPoint;
0068 double myRadius;
0069 };
0070
0071 #endif