]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketcherPrs/SketcherPrs_SensitivePoint.h
Salome HOME
Merge remote-tracking branch 'origin/PortingSalome760' into Dev_1.3.0
[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 <Graphic3d_ArrayOfPoints.hxx>
12 #include <Standard_DefineHandle.hxx>
13
14
15 DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
16
17 /**
18 * \ingroup GUI
19 * This sensitive point is done in order to optimize process of the sinzitive area update
20 * It referes on point array directly and this lets to avoid procedure of the point synchronisation
21 */
22 class SketcherPrs_SensitivePoint : public Select3D_SensitiveEntity
23 {
24 public: 
25   //! Constructs a sensitive point object defined by the
26   //! owner OwnerId and the point Point.
27   Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId, 
28     const Handle(Graphic3d_ArrayOfPoints)& thePntArray, int theId);
29   
30   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
31
32   //! Update location of the point
33   //! \param aLocation a new location
34   Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
35
36   //! Checks whether the point overlaps current selecting volume
37   Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
38                                                     SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
39
40   //! Returns the point used at the time of construction.
41   Standard_EXPORT gp_Pnt Point() const;
42
43   //! Returns center of point. If location transformation
44   //! is set, it will be applied
45   Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
46
47   //! Returns bounding box of the point. If location
48   //! transformation is set, it will be applied
49   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
50   
51
52   DEFINE_STANDARD_RTTI(SketcherPrs_SensitivePoint)
53
54 private: 
55   int myId;
56   Handle(Graphic3d_ArrayOfPoints) myPntArray;
57 };
58
59
60 #endif