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
0017 #ifndef _Select3D_SensitiveWire_HeaderFile
0018 #define _Select3D_SensitiveWire_HeaderFile
0019
0020 #include <Select3D_SensitiveSet.hxx>
0021
0022
0023
0024 class Select3D_SensitiveWire : public Select3D_SensitiveSet
0025 {
0026 public:
0027
0028
0029
0030 Standard_EXPORT Select3D_SensitiveWire (const Handle(SelectMgr_EntityOwner)& theOwnerId);
0031
0032
0033 Standard_EXPORT void Add (const Handle(Select3D_SensitiveEntity)& theSensitive);
0034
0035
0036 Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
0037
0038 Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
0039
0040
0041 Standard_EXPORT const NCollection_Vector<Handle(Select3D_SensitiveEntity)>& GetEdges();
0042
0043
0044 Standard_EXPORT virtual void Set (const Handle(SelectMgr_EntityOwner)& theOwnerId) Standard_OVERRIDE;
0045
0046 Standard_EXPORT Handle(Select3D_SensitiveEntity) GetLastDetected() const;
0047
0048
0049
0050 Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
0051
0052
0053
0054 Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
0055
0056
0057 Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
0058
0059
0060 Standard_EXPORT virtual Select3D_BndBox3d Box (const Standard_Integer theIdx) const Standard_OVERRIDE;
0061
0062
0063
0064 Standard_EXPORT virtual Standard_Real Center (const Standard_Integer theIdx,
0065 const Standard_Integer theAxis) const Standard_OVERRIDE;
0066
0067
0068 Standard_EXPORT virtual void Swap (const Standard_Integer theIdx1,
0069 const Standard_Integer theIdx2) Standard_OVERRIDE;
0070
0071
0072 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0073
0074 DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveWire,Select3D_SensitiveSet)
0075
0076 protected:
0077
0078
0079 Standard_EXPORT virtual Standard_Boolean overlapsElement (SelectBasics_PickResult& thePickResult,
0080 SelectBasics_SelectingVolumeManager& theMgr,
0081 Standard_Integer theElemIdx,
0082 Standard_Boolean theIsFullInside) Standard_OVERRIDE;
0083
0084
0085 Standard_EXPORT virtual Standard_Boolean elementIsInside (SelectBasics_SelectingVolumeManager& theMgr,
0086 Standard_Integer theElemIdx,
0087 Standard_Boolean theIsFullInside) Standard_OVERRIDE;
0088
0089
0090 Standard_EXPORT virtual Standard_Real distanceToCOG (SelectBasics_SelectingVolumeManager& theMgr) Standard_OVERRIDE;
0091
0092 private:
0093
0094 NCollection_Vector<Handle(Select3D_SensitiveEntity)> myEntities;
0095 NCollection_Vector<Standard_Integer> myEntityIndexes;
0096 gp_Pnt myCenter;
0097 mutable Select3D_BndBox3d myBndBox;
0098 };
0099
0100 DEFINE_STANDARD_HANDLE(Select3D_SensitiveWire, Select3D_SensitiveEntity)
0101
0102 #endif