8c13b9e2eea315b7e67b825bc7c429150ff30ec0
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession2D_Curve.h
1 #ifndef _ISession2D_Curve_HeaderFile
2 #define _ISession2D_Curve_HeaderFile
3
4 #include <Standard_Macro.hxx>
5 #include <Standard_DefineHandle.hxx>
6
7
8 #include <Quantity_Length.hxx>
9 #include <Aspect_TypeOfline.hxx>
10 #include <Aspect_WidthOfline.hxx>
11 #include <Standard_Integer.hxx>
12 #include <SelectMgr_SelectableObject.hxx>
13 #include <SelectMgr_Selection.hxx>
14 #include <Standard_OStream.hxx>
15 #include <Standard_IStream.hxx>
16 #include <Standard_CString.hxx>
17
18 class TColGeom2d_HSequenceOfCurve;
19 class PrsMgr_PresentationManager2d;
20 class Graphic2d_GraphicObject;
21 class SelectMgr_Selection;
22
23 #include "Geom2d_Curve.hxx"
24
25 #include "AIS_InteractiveObject.hxx"
26
27 DEFINE_STANDARD_HANDLE(ISession2D_Curve,AIS_InteractiveObject)
28 class ISession2D_Curve : public AIS_InteractiveObject {
29
30 public:
31
32   // Methods PUBLIC
33   // 
34
35   ISession2D_Curve
36     (const Handle_Geom2d_Curve aGeom2dCurve,
37     const Aspect_TypeOfLine aTypeOfline = Aspect_TOL_SOLID,
38     const Aspect_WidthOfLine aWidthOfLine = Aspect_WOL_MEDIUM,
39     const Standard_Integer aColorIndex = 4);
40
41   inline   Standard_Integer   NbPossibleSelection() const;
42
43   inline   Aspect_TypeOfLine  GetTypeOfLine() const;
44   inline   void SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine);
45
46   inline   Aspect_WidthOfLine GetWidthOfLine() const;
47   inline   void SetWidthOfLine(const Aspect_WidthOfLine aNewWidthOfLine);
48
49   inline   Standard_Integer GetColorIndex() const;
50   inline   void SetColorIndex(const Standard_Integer aNewColorIndex) ;
51
52   inline   Standard_Boolean GetDisplayPole() const;
53   inline   void SetDisplayPole(const Standard_Boolean aNewDisplayPole) ;
54
55   inline   Standard_Boolean ISession2D_Curve::GetDisplayCurbure() const;
56   inline   void ISession2D_Curve::SetDisplayCurbure
57                 (const Standard_Boolean aNewDisplayCurbure);
58
59   inline   Standard_Real GetDiscretisation() const;
60   inline   void SetDiscretisation(const Standard_Real aNewDiscretisation) ;
61
62   DEFINE_STANDARD_RTTI(ISession2D_Curve)
63
64 private: 
65
66   // Methods PRIVATE
67   // 
68   virtual  void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
69   void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
70
71   // Fields PRIVATE
72   //
73   Handle_Geom2d_Curve myGeom2dCurve;
74   Aspect_TypeOfLine   myTypeOfLine;
75   Aspect_WidthOfLine  myWidthOfLine;
76   Standard_Integer    myColorIndex;
77   Standard_Boolean    myDisplayPole;
78   Standard_Boolean    myDisplayCurbure;
79   Standard_Real       myDiscretisation;
80   Standard_Real       myradiusmax ;
81   Standard_Real       myradiusratio ;
82 };
83
84
85
86 // other inCurve functions and methods (like "C++: function call" methods)
87 //
88
89 inline   Standard_Integer  ISession2D_Curve::NbPossibleSelection() const
90 {
91   return 1;
92 }
93
94 inline  Aspect_TypeOfLine ISession2D_Curve::GetTypeOfLine() const
95 {
96   return myTypeOfLine ;
97 }
98
99 inline  void ISession2D_Curve::SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine) 
100 {
101   myTypeOfLine = aNewTypeOfLine;
102 }
103
104 inline  Aspect_WidthOfLine ISession2D_Curve::GetWidthOfLine() const
105 {
106   return myWidthOfLine ;
107 }
108
109 inline  void ISession2D_Curve::SetWidthOfLine(const Aspect_WidthOfLine aNewWidthOfLine) 
110 {
111   myWidthOfLine = aNewWidthOfLine;
112 }
113
114 inline  Standard_Integer ISession2D_Curve::GetColorIndex() const
115 {
116   return myColorIndex ;
117 }
118
119 inline  void ISession2D_Curve::SetColorIndex(const Standard_Integer aNewColorIndex) 
120 {
121   myColorIndex = aNewColorIndex;
122 }
123
124 inline   Standard_Boolean  ISession2D_Curve::GetDisplayPole
125 () const
126 {
127   return myDisplayPole;
128 }
129 inline   void               ISession2D_Curve::SetDisplayPole
130 (const Standard_Boolean aNewDisplayPole)
131 {
132   myDisplayPole = aNewDisplayPole;
133 }
134
135 inline   Standard_Boolean  ISession2D_Curve::GetDisplayCurbure
136 () const
137 {
138   return myDisplayCurbure;
139 }
140 inline   void               ISession2D_Curve::SetDisplayCurbure
141 (const Standard_Boolean aNewDisplayCurbure)
142 {
143   myDisplayCurbure = aNewDisplayCurbure;
144 }
145
146
147 inline   Standard_Real  ISession2D_Curve::GetDiscretisation
148 () const
149 {
150   return myDiscretisation;
151 }
152 inline   void               ISession2D_Curve::SetDiscretisation
153 (const Standard_Real aNewDiscretisation) 
154 {
155   myDiscretisation = aNewDiscretisation;
156 }
157
158
159
160 #endif
161