Salome HOME
Simplification of environment due to SALOME standards
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_SensitivePoint.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        SketcherPrs_SensitivePoint.h
4 // Created:     24 March 2015
5 // Author:      Vitaly SMETANNIKOV
6
7 #ifndef SketcherPrs_SensitivePoint_H
8 #define SketcherPrs_SensitivePoint_H
9
10 #include <Select3D_SensitiveEntity.hxx>
11 #include <Standard_DefineHandle.hxx>
12
13
14 DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
15
16 /**
17 * \ingroup GUI
18 * This sensitive point is done in order to optimize process of the sinzitive area update
19 * It referes on point array directly and this lets to avoid procedure of the point synchronisation
20 */
21 class SketcherPrs_SensitivePoint : public Select3D_SensitiveEntity
22 {
23 public: 
24   //! Constructs a sensitive point object defined by the
25   //! \param OwnerId an Id of the Owner.
26   //! \param theId and Id of its point
27   Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId, int theId);
28   
29   /// Returns number of sub-elements
30   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
31
32   //! Update location of the point
33   Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
34
35   //! Checks whether the point overlaps current selecting volume
36   //! \param theMgr selection manager
37   //! \param thePickResult returns pick result
38   Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
39                                                     SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
40
41   //! Returns the point used at the time of construction.
42   Standard_EXPORT gp_Pnt Point() const;
43
44   //! Returns center of point. If location transformation
45   //! is set, it will be applied
46   Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
47
48   //! Returns bounding box of the point. If location
49   //! transformation is set, it will be applied
50   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
51
52   /// Clear sub-elements
53   Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
54
55   DEFINE_STANDARD_RTTI(SketcherPrs_SensitivePoint)
56
57 private: 
58   int myId;
59 };
60
61
62 #endif