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 | |
f751596e |
20 | #include <Geom_Curve.hxx> |
f751596e |
21 | #include <Select3D_SensitivePoly.hxx> |
b7c077b9 |
22 | #include <TColgp_HArray1OfPnt.hxx> |
f751596e |
23 | #include <SelectMgr_SelectingVolumeManager.hxx> |
f751596e |
24 | |
f751596e |
25 | class Standard_ConstructionError; |
26 | class Standard_OutOfRange; |
f751596e |
27 | |
28 | //! A framework to define a sensitive 3D curve. |
29 | //! In some cases this class can raise Standard_ConstructionError and |
30 | //! Standard_OutOfRange exceptions. For more details see Select3D_SensitivePoly. |
31 | class Select3D_SensitiveCurve : public Select3D_SensitivePoly |
32 | { |
0609d8ee |
33 | DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveCurve, Select3D_SensitivePoly) |
f751596e |
34 | public: |
35 | |
36 | //! Constructs a sensitive curve object defined by the |
37 | //! owner theOwnerId, the curve theCurve, and the |
38 | //! maximum number of points on the curve: theNbPnts. |
0ef04197 |
39 | Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId, |
f751596e |
40 | const Handle(Geom_Curve)& theCurve, |
41 | const Standard_Integer theNbPnts = 17); |
42 | |
43 | //! Constructs a sensitive curve object defined by the |
44 | //! owner theOwnerId and the set of points ThePoints. |
0ef04197 |
45 | Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId, |
f751596e |
46 | const Handle(TColgp_HArray1OfPnt)& thePoints); |
47 | |
48 | //! Creation of Sensitive Curve from Points. |
49 | //! Warning : This Method should disappear in the next version... |
0ef04197 |
50 | Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId, |
f751596e |
51 | const TColgp_Array1OfPnt& thePoints); |
52 | |
f751596e |
53 | //! Returns the copy of this |
54 | Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE; |
55 | |
f751596e |
56 | private: |
57 | |
58 | void loadPoints (const Handle(Geom_Curve)& aCurve, |
59 | const Standard_Integer NbPoints); |
60 | |
61 | private: |
62 | |
35c0599a |
63 | Handle(Geom_Curve) myCurve; //!< Curve points |
f751596e |
64 | }; |
65 | |
66 | DEFINE_STANDARD_HANDLE(Select3D_SensitiveCurve, Select3D_SensitivePoly) |
67 | |
68 | #endif // _Select3D_SensitiveCurve_HeaderFile |