Salome HOME
Update of documentation
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_SensitivePoint.h
index ca30fe4344b58f39f5bad8b54deb50c30c475e2e..000df1a4fed08076817643170735018073764da8 100644 (file)
@@ -8,8 +8,6 @@
 #define SketcherPrs_SensitivePoint_H
 
 #include <Select3D_SensitiveEntity.hxx>
-#include <Graphic3d_ArrayOfPoints.hxx>
-#include <Select3D_Pnt2d.hxx>
 #include <Standard_DefineHandle.hxx>
 
 
@@ -24,50 +22,40 @@ class SketcherPrs_SensitivePoint : public Select3D_SensitiveEntity
 {
 public: 
   //! Constructs a sensitive point object defined by the
-  //! owner OwnerId and the point Point.
-  Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId, 
-    const Handle(Graphic3d_ArrayOfPoints)& thePntArray, int theId);
-  
-  //! Converts the stored 3D point into a 2D point according
-  //! to <aProjector> ; this method is called by the selection Manager.
-  Standard_EXPORT   void Project (const Handle(Select3D_Projector)& aProjector) ;
-  
-  //! stores in <aresult> the 2D sensitive box which represents
-  //! the point area in the selection process.
-  Standard_EXPORT   void Areas (SelectBasics_ListOfBox2d& aresult) ;
+  //! \param OwnerId an Id of the Owner.
+  //! \param theId and Id of its point
+  Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId, int theId);
   
+  /// Returns number of sub-elements
+  Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
+
   //! Update location of the point
-  //! \param aLocation a new location
-  Standard_EXPORT   Handle(Select3D_SensitiveEntity) GetConnected (const TopLoc_Location& aLocation) ;
-  
-  //! Checks whether the sensitive entity matches the picking
-  //! detection area (close to the picking line).
-  //! For details please refer to base class declaration.
-  Standard_EXPORT   Standard_Boolean Matches (const SelectBasics_PickArgs& thePickArgs, Standard_Real& theMatchDMin, Standard_Real& theMatchDepth) ;
-  
-  /// Returns true if the current point is matches with given rectangle
-  /// \param XMin an X min coordinate
-  /// \param YMin an Y min coordinate
-  /// \param XMax an X max coordinate
-  /// \param YMax an Y max coordinate
-  /// \param aTol a tolerance
-  Standard_EXPORT   Standard_Boolean Matches (const Standard_Real XMin, const Standard_Real YMin, const Standard_Real XMax, const Standard_Real YMax, const Standard_Real aTol) ;
-  
-  Standard_EXPORT virtual   Standard_Boolean Matches (const TColgp_Array1OfPnt2d& Polyline, const Bnd_Box2d& aBox, const Standard_Real aTol) ;
-  
-  Standard_EXPORT   Standard_Real ComputeDepth (const gp_Lin& EyeLine)  const;
-  
+  Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
+
+  //! Checks whether the point overlaps current selecting volume
+  //! \param theMgr selection manager
+  //! \param thePickResult returns pick result
+  Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
+                                                    SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
+
   //! Returns the point used at the time of construction.
-  Standard_EXPORT   gp_Pnt Point()  const;
+  Standard_EXPORT gp_Pnt Point() const;
+
+  //! Returns center of point. If location transformation
+  //! is set, it will be applied
+  Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
+
+  //! Returns bounding box of the point. If location
+  //! transformation is set, it will be applied
+  Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
 
-  Standard_EXPORT virtual   void Dump (Standard_OStream& S, const Standard_Boolean FullDump = Standard_True)  const;
+  /// Clear sub-elements
+  Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTI(SketcherPrs_SensitivePoint)
 
 private: 
   int myId;
-  Handle(Graphic3d_ArrayOfPoints) myPntArray;
-  Select3D_Pnt2d myprojpt;
 };