Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:13:41

0001 // Created on: 1995-03-10
0002 // Created by: Mister rmi
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Select3D_SensitivePoint_HeaderFile
0018 #define _Select3D_SensitivePoint_HeaderFile
0019 
0020 #include <Select3D_SensitiveEntity.hxx>
0021 #include <SelectMgr_SelectingVolumeManager.hxx>
0022 
0023 //! A framework to define sensitive 3D points.
0024 class Select3D_SensitivePoint : public Select3D_SensitiveEntity
0025 {
0026   DEFINE_STANDARD_RTTIEXT(Select3D_SensitivePoint, Select3D_SensitiveEntity)
0027 public:
0028   //! Constructs a sensitive point object defined by the
0029   //! owner OwnerId and the point Point.
0030   Standard_EXPORT Select3D_SensitivePoint(const occ::handle<SelectMgr_EntityOwner>& theOwnerId,
0031                                           const gp_Pnt&                             thePoint);
0032 
0033   //! Returns the amount of sub-entities in sensitive
0034   Standard_EXPORT int NbSubElements() const override;
0035 
0036   Standard_EXPORT occ::handle<Select3D_SensitiveEntity> GetConnected() override;
0037 
0038   //! Checks whether the point overlaps current selecting volume
0039   Standard_EXPORT bool Matches(SelectBasics_SelectingVolumeManager& theMgr,
0040                                SelectBasics_PickResult&             thePickResult) override;
0041 
0042   //! Returns the point used at the time of construction.
0043   const gp_Pnt& Point() const { return myPoint; }
0044 
0045   //! Returns center of point. If location transformation
0046   //! is set, it will be applied
0047   Standard_EXPORT gp_Pnt CenterOfGeometry() const override;
0048 
0049   //! Returns bounding box of the point. If location
0050   //! transformation is set, it will be applied
0051   Standard_EXPORT Select3D_BndBox3d BoundingBox() override;
0052 
0053   //! Returns TRUE if BVH tree is in invalidated state
0054   bool ToBuildBVH() const override { return false; }
0055 
0056   //! Dumps the content of me into the stream
0057   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0058 
0059 private:
0060   gp_Pnt myPoint; //!< 3d coordinates of the point
0061 };
0062 
0063 #endif // _Select3D_SensitivePoint_HeaderFile