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 <SelectBasics_EntityOwner.hxx>
24 #include <Select3D_SensitiveEntity.hxx>
25 #include <Standard_DefineHandle.hxx>
28 DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
32 * This sensitive point is done in order to optimize process of the sinzitive area update
33 * It referes on point array directly and this lets to avoid procedure of the point synchronisation
35 class SketcherPrs_SensitivePoint : public Select3D_SensitiveEntity
38 //! Constructs a sensitive point object defined by the
39 //! \param OwnerId an Id of the Owner.
40 //! \param theId and Id of its point
41 Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId,
44 /// Returns number of sub-elements
45 Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
47 //! Update location of the point
48 Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
50 //! Checks whether the point overlaps current selecting volume
51 //! \param theMgr selection manager
52 //! \param thePickResult returns pick result
53 Standard_EXPORT virtual Standard_Boolean Matches(SelectBasics_SelectingVolumeManager& theMgr,
54 SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
56 //! Returns the point used at the time of construction.
57 Standard_EXPORT gp_Pnt Point() const;
59 //! Returns center of point. If location transformation
60 //! is set, it will be applied
61 Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
63 //! Returns bounding box of the point. If location
64 //! transformation is set, it will be applied
65 Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
67 /// Clear sub-elements
68 Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
70 DEFINE_STANDARD_RTTIEXT(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)