f751596e |
1 | // Created on: 1995-03-13 |
2 | // Created by: Robert COUBLANC |
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_SensitiveCurve_HeaderFile |
18 | #define _Select3D_SensitiveCurve_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
ec357c5c |
21 | #include <Standard_Type.hxx> |
f751596e |
22 | #include <Standard_Type.hxx> |
23 | |
24 | #include <Geom_Curve.hxx> |
f751596e |
25 | #include <Select3D_SensitivePoly.hxx> |
b7c077b9 |
26 | #include <TColgp_HArray1OfPnt.hxx> |
f751596e |
27 | #include <Standard_Boolean.hxx> |
28 | #include <SelectMgr_SelectingVolumeManager.hxx> |
29 | #include <Standard_Real.hxx> |
30 | #include <Standard_OStream.hxx> |
31 | |
32 | class Geom_Curve; |
33 | class Standard_ConstructionError; |
34 | class Standard_OutOfRange; |
35 | class SelectBasics_EntityOwner; |
f751596e |
36 | class Select3D_SensitiveEntity; |
37 | class TopLoc_Location; |
38 | |
39 | |
40 | //! A framework to define a sensitive 3D curve. |
41 | //! In some cases this class can raise Standard_ConstructionError and |
42 | //! Standard_OutOfRange exceptions. For more details see Select3D_SensitivePoly. |
43 | class Select3D_SensitiveCurve : public Select3D_SensitivePoly |
44 | { |
45 | public: |
46 | |
47 | //! Constructs a sensitive curve object defined by the |
48 | //! owner theOwnerId, the curve theCurve, and the |
49 | //! maximum number of points on the curve: theNbPnts. |
50 | Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId, |
51 | const Handle(Geom_Curve)& theCurve, |
52 | const Standard_Integer theNbPnts = 17); |
53 | |
54 | //! Constructs a sensitive curve object defined by the |
55 | //! owner theOwnerId and the set of points ThePoints. |
56 | Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId, |
57 | const Handle(TColgp_HArray1OfPnt)& thePoints); |
58 | |
59 | //! Creation of Sensitive Curve from Points. |
60 | //! Warning : This Method should disappear in the next version... |
61 | Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId, |
62 | const TColgp_Array1OfPnt& thePoints); |
63 | |
f751596e |
64 | //! Returns the copy of this |
65 | Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE; |
66 | |
67 | public: |
68 | |
92efcf78 |
69 | DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveCurve,Select3D_SensitivePoly) |
f751596e |
70 | |
71 | private: |
72 | |
73 | void loadPoints (const Handle(Geom_Curve)& aCurve, |
74 | const Standard_Integer NbPoints); |
75 | |
76 | private: |
77 | |
35c0599a |
78 | Handle(Geom_Curve) myCurve; //!< Curve points |
f751596e |
79 | }; |
80 | |
81 | DEFINE_STANDARD_HANDLE(Select3D_SensitiveCurve, Select3D_SensitivePoly) |
82 | |
83 | #endif // _Select3D_SensitiveCurve_HeaderFile |