0025991: Cyclic dependency in OCCT detected by WOK compiler
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession2D_SensitiveCurve.h
1 // File generated by CPPExt (Transient)
2 //
3 //                     Copyright (C) 1991,1995 by
4 //  
5 //                      MATRA DATAVISION, FRANCE
6 //  
7 // This software is furnished in accordance with the terms and conditions
8 // of the contract and with the inclusion of the above copyright notice.
9 // This software or any other copy thereof may not be provided or otherwise
10 // be made available to any other person. No title to an ownership of the
11 // software is hereby transferred.
12 //  
13 // At the termination of the contract, the software and all copies of this
14 // software must be deleted.
15 //
16 #ifndef _ISession2D_SensitiveCurve_HeaderFile
17 #define _ISession2D_SensitiveCurve_HeaderFile
18 #include <Standard_Macro.hxx>
19 #include <Standard_DefineHandle.hxx>
20
21
22 #include <Standard_Integer.hxx>
23 #include <gp_Pnt2d.hxx>
24 #include <Select3D_SensitiveEntity.hxx>
25 #include <SelectBasics_EntityOwner.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Real.hxx>
28 class SelectBasics_EntityOwner;
29 class gp_Pnt2d;
30 #include <SelectBasics_ListOfBox2d.hxx>
31 #include "TColgp_HArray1OfPnt2d.hxx"
32 #include <Geom2d_Curve.hxx>
33
34
35 DEFINE_STANDARD_HANDLE(ISession2D_SensitiveCurve,Select3D_SensitiveEntity)
36 class ISession2D_SensitiveCurve : public Select3D_SensitiveEntity {
37
38 public:
39
40  // Methods PUBLIC
41  // 
42   Standard_EXPORT ISession2D_SensitiveCurve(const Handle(SelectBasics_EntityOwner)& OwnerId,
43                                             const Handle(Geom2d_Curve)& C,
44                                             const Standard_Real CDeflect,
45                                             const Standard_Integer      MaxRect  = 3);
46   inline   void SetMaxBoxes(const Standard_Integer MaxRect) ;
47   inline virtual  Standard_Integer MaxBoxes() const;
48
49   inline   void SetCurve(const Handle(Geom2d_Curve) aCurve) ;
50   inline   Handle(Geom2d_Curve) GetCurve() ;
51
52   void     Compute();
53
54   Standard_EXPORT   void Areas(SelectBasics_ListOfBox2d& aSeq) ;
55   Standard_EXPORT   Standard_Boolean Matches(const Standard_Real XMin,const Standard_Real YMin,const Standard_Real XMax,const Standard_Real YMax,const Standard_Real aTol) ;
56   Standard_EXPORT   Standard_Boolean Matches(const Standard_Real X,const Standard_Real Y,const Standard_Real aTol,Standard_Real& DMin) ;
57   Handle(TColgp_HArray1OfPnt2d) SensitivePolygon();
58
59   DEFINE_STANDARD_RTTI(ISession2D_SensitiveCurve)
60
61 private: 
62  // Fields PRIVATE
63  //
64 Standard_Real                 myCDeflect;
65 Standard_Integer              myMaxRect;
66 Handle(Geom2d_Curve)          myCurve;
67 Handle(TColgp_HArray1OfPnt2d) myPolyP2d;
68
69 };
70
71 inline Standard_Integer ISession2D_SensitiveCurve::
72 MaxBoxes() const {return myMaxRect;}
73
74 inline void ISession2D_SensitiveCurve::
75 SetMaxBoxes(const Standard_Integer nbrect)
76 {myMaxRect = nbrect;}
77
78 inline void ISession2D_SensitiveCurve::
79 SetCurve(const Handle(Geom2d_Curve) aCurve) 
80 {myCurve = aCurve;} 
81
82 inline Handle(Geom2d_Curve) ISession2D_SensitiveCurve::
83 GetCurve() 
84 {return myCurve;} 
85
86 #endif