1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef SketcherPrs_SensitivePoint_H
21 #define SketcherPrs_SensitivePoint_H
23 #include <Select3D_SensitiveEntity.hxx>
24 #include <Standard_DefineHandle.hxx>
27 DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
31 * This sensitive point is done in order to optimize process of the sinzitive area update
32 * It referes on point array directly and this lets to avoid procedure of the point synchronisation
34 class SketcherPrs_SensitivePoint : public Select3D_SensitiveEntity
37 //! Constructs a sensitive point object defined by the
38 //! \param OwnerId an Id of the Owner.
39 //! \param theId and Id of its point
40 Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId,
43 /// Returns number of sub-elements
44 Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
46 //! Update location of the point
47 Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
49 //! Checks whether the point overlaps current selecting volume
50 //! \param theMgr selection manager
51 //! \param thePickResult returns pick result
52 Standard_EXPORT virtual Standard_Boolean Matches(SelectBasics_SelectingVolumeManager& theMgr,
53 SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
55 //! Returns the point used at the time of construction.
56 Standard_EXPORT gp_Pnt Point() const;
58 //! Returns center of point. If location transformation
59 //! is set, it will be applied
60 Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
62 //! Returns bounding box of the point. If location
63 //! transformation is set, it will be applied
64 Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
66 /// Clear sub-elements
67 Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
69 DEFINE_STANDARD_RTTIEXT(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)