7fd59977 |
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> |
5c1f974e |
13 | #include <SelectMgr_Selection.hxx> |
7fd59977 |
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; |
7fd59977 |
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 | |
5c1f974e |
32 | // Methods PUBLIC |
33 | // |
7fd59977 |
34 | |
5c1f974e |
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); |
7fd59977 |
40 | |
5c1f974e |
41 | inline Standard_Integer NbPossibleSelection() const; |
7fd59977 |
42 | |
5c1f974e |
43 | inline Aspect_TypeOfLine GetTypeOfLine() const; |
44 | inline void SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine); |
7fd59977 |
45 | |
5c1f974e |
46 | inline Aspect_WidthOfLine GetWidthOfLine() const; |
47 | inline void SetWidthOfLine(const Aspect_WidthOfLine aNewWidthOfLine); |
7fd59977 |
48 | |
5c1f974e |
49 | inline Standard_Integer GetColorIndex() const; |
50 | inline void SetColorIndex(const Standard_Integer aNewColorIndex) ; |
7fd59977 |
51 | |
5c1f974e |
52 | inline Standard_Boolean GetDisplayPole() const; |
53 | inline void SetDisplayPole(const Standard_Boolean aNewDisplayPole) ; |
7fd59977 |
54 | |
5c1f974e |
55 | inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure() const; |
56 | inline void ISession2D_Curve::SetDisplayCurbure |
57 | (const Standard_Boolean aNewDisplayCurbure); |
7fd59977 |
58 | |
5c1f974e |
59 | inline Standard_Real GetDiscretisation() const; |
60 | inline void SetDiscretisation(const Standard_Real aNewDiscretisation) ; |
7fd59977 |
61 | |
5c1f974e |
62 | DEFINE_STANDARD_RTTI(ISession2D_Curve) |
7fd59977 |
63 | |
64 | private: |
65 | |
5c1f974e |
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 ; |
7fd59977 |
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 | { |
5c1f974e |
91 | return 1; |
7fd59977 |
92 | } |
93 | |
94 | inline Aspect_TypeOfLine ISession2D_Curve::GetTypeOfLine() const |
95 | { |
96 | return myTypeOfLine ; |
97 | } |
5c1f974e |
98 | |
7fd59977 |
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 |
5c1f974e |
125 | () const |
7fd59977 |
126 | { |
5c1f974e |
127 | return myDisplayPole; |
7fd59977 |
128 | } |
129 | inline void ISession2D_Curve::SetDisplayPole |
5c1f974e |
130 | (const Standard_Boolean aNewDisplayPole) |
7fd59977 |
131 | { |
5c1f974e |
132 | myDisplayPole = aNewDisplayPole; |
7fd59977 |
133 | } |
134 | |
135 | inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure |
5c1f974e |
136 | () const |
7fd59977 |
137 | { |
5c1f974e |
138 | return myDisplayCurbure; |
7fd59977 |
139 | } |
140 | inline void ISession2D_Curve::SetDisplayCurbure |
5c1f974e |
141 | (const Standard_Boolean aNewDisplayCurbure) |
7fd59977 |
142 | { |
5c1f974e |
143 | myDisplayCurbure = aNewDisplayCurbure; |
7fd59977 |
144 | } |
145 | |
5c1f974e |
146 | |
7fd59977 |
147 | inline Standard_Real ISession2D_Curve::GetDiscretisation |
5c1f974e |
148 | () const |
7fd59977 |
149 | { |
5c1f974e |
150 | return myDiscretisation; |
7fd59977 |
151 | } |
152 | inline void ISession2D_Curve::SetDiscretisation |
5c1f974e |
153 | (const Standard_Real aNewDiscretisation) |
7fd59977 |
154 | { |
5c1f974e |
155 | myDiscretisation = aNewDiscretisation; |
7fd59977 |
156 | } |
157 | |
158 | |
159 | |
160 | #endif |
161 | |