File indexing completed on 2025-01-18 10:04:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Select3D_SensitiveBox_HeaderFile
0018 #define _Select3D_SensitiveBox_HeaderFile
0019
0020 #include <Select3D_SensitiveEntity.hxx>
0021
0022
0023 class Select3D_SensitiveBox : public Select3D_SensitiveEntity
0024 {
0025 DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveBox, Select3D_SensitiveEntity)
0026 public:
0027
0028
0029
0030 Standard_EXPORT Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner)& theOwnerId, const Bnd_Box& theBox);
0031
0032
0033
0034
0035
0036
0037
0038 Standard_EXPORT Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner)& theOwnerId,
0039 const Standard_Real theXMin,
0040 const Standard_Real theYMin,
0041 const Standard_Real theZMin,
0042 const Standard_Real theXMax,
0043 const Standard_Real theYMax,
0044 const Standard_Real theZMax);
0045
0046
0047 Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
0048
0049 Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
0050
0051
0052 Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
0053 SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
0054
0055 Bnd_Box Box() const
0056 {
0057 Bnd_Box aBox;
0058 aBox.Update (myBox.CornerMin().x(), myBox.CornerMin().y(), myBox.CornerMin().z(),
0059 myBox.CornerMax().x(), myBox.CornerMax().y(), myBox.CornerMax().z());
0060
0061 return aBox;
0062 }
0063
0064
0065
0066 Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
0067
0068
0069
0070 Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
0071
0072
0073 virtual Standard_Boolean ToBuildBVH() const Standard_OVERRIDE { return Standard_False; }
0074
0075
0076 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0077
0078 private:
0079
0080 Select3D_BndBox3d myBox;
0081 gp_Pnt myCenter3d;
0082 };
0083
0084 DEFINE_STANDARD_HANDLE(Select3D_SensitiveBox, Select3D_SensitiveEntity)
0085
0086 #endif