f751596e |
1 | // Created on: 1995-03-10 |
2 | // Created by: Mister rmi |
3 | // Copyright (c) 1995-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Select3D_SensitivePoint_HeaderFile |
18 | #define _Select3D_SensitivePoint_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
ec357c5c |
21 | #include <Standard_Type.hxx> |
f751596e |
22 | #include <Standard_Type.hxx> |
23 | |
24 | #include <Select3D_Pnt.hxx> |
25 | #include <Select3D_SensitiveEntity.hxx> |
f751596e |
26 | #include <Standard_Boolean.hxx> |
27 | #include <SelectMgr_SelectingVolumeManager.hxx> |
28 | #include <Standard_Real.hxx> |
29 | #include <Standard_OStream.hxx> |
30 | |
31 | class SelectBasics_EntityOwner; |
32 | class gp_Pnt; |
33 | class TopLoc_Location; |
34 | |
35 | //! A framework to define sensitive 3D points. |
36 | class Select3D_SensitivePoint : public Select3D_SensitiveEntity |
37 | { |
38 | public: |
39 | |
40 | //! Constructs a sensitive point object defined by the |
41 | //! owner OwnerId and the point Point. |
42 | Standard_EXPORT Select3D_SensitivePoint (const Handle(SelectBasics_EntityOwner)& theOwnerId, const gp_Pnt& thePoint); |
43 | |
44 | //! Returns the amount of sub-entities in sensitive |
45 | Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE; |
46 | |
47 | Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE; |
48 | |
49 | //! Checks whether the point overlaps current selecting volume |
50 | Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, |
51 | SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; |
52 | |
53 | //! Returns the point used at the time of construction. |
54 | Standard_EXPORT gp_Pnt Point() const; |
55 | |
56 | //! Returns center of point. If location transformation |
57 | //! is set, it will be applied |
58 | Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE; |
59 | |
60 | //! Returns bounding box of the point. If location |
61 | //! transformation is set, it will be applied |
62 | Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE; |
63 | |
92efcf78 |
64 | DEFINE_STANDARD_RTTIEXT(Select3D_SensitivePoint,Select3D_SensitiveEntity) |
f751596e |
65 | |
66 | private: |
67 | |
68 | gp_Pnt myPoint; //!< 3d coordinates of the point |
69 | }; |
70 | |
71 | DEFINE_STANDARD_HANDLE(Select3D_SensitivePoint, Select3D_SensitiveEntity) |
72 | |
73 | #endif // _Select3D_SensitivePoint_HeaderFile |