0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / StdObject / StdObject_gp_Curves.hxx
CommitLineData
45d8465e 1// Copyright (c) 2015 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14
15#ifndef _StdObject_gp_Curves_HeaderFile
16#define _StdObject_gp_Curves_HeaderFile
17
18
19#include <StdObject_gp_Axes.hxx>
20
21#include <gp_Lin2d.hxx>
22#include <gp_Circ2d.hxx>
23#include <gp_Elips2d.hxx>
24#include <gp_Hypr2d.hxx>
25#include <gp_Parab2d.hxx>
26#include <gp_Lin.hxx>
27#include <gp_Circ.hxx>
28#include <gp_Elips.hxx>
29#include <gp_Hypr.hxx>
30#include <gp_Parab.hxx>
31
32
33inline StdObjMgt_ReadData& operator >>
ec964372 34 (StdObjMgt_ReadData& theReadData, gp_Lin2d& theLin)
45d8465e 35{
36 gp_Ax2d anAx;
37 theReadData >> anAx;
38 theLin.SetPosition (anAx);
39 return theReadData;
40}
41
ec964372 42inline StdObjMgt_WriteData& operator <<
43 (StdObjMgt_WriteData& theWriteData, const gp_Lin2d& theLin)
44{
45 const gp_Ax2d& anAx = theLin.Position();
46 write (theWriteData, anAx);
47 return theWriteData;
48}
49
45d8465e 50inline StdObjMgt_ReadData& operator >>
ec964372 51 (StdObjMgt_ReadData& theReadData, gp_Circ2d& theCirc)
45d8465e 52{
53 gp_Ax22d anAx;
54 Standard_Real aRadius;
55
56 theReadData >> anAx >> aRadius;
57
58 theCirc.SetAxis (anAx);
59 theCirc.SetRadius (aRadius);
60
61 return theReadData;
62}
63
ec964372 64inline StdObjMgt_WriteData& operator <<
65 (StdObjMgt_WriteData& theWriteData, const gp_Circ2d& theCirc)
66{
67 const gp_Ax22d& anAx = theCirc.Position();
68 Standard_Real aRadius = theCirc.Radius();
69 theWriteData << anAx << aRadius;
70 return theWriteData;
71}
72
45d8465e 73inline StdObjMgt_ReadData& operator >>
ec964372 74 (StdObjMgt_ReadData& theReadData, gp_Elips2d& theElips)
45d8465e 75{
76 gp_Ax22d anAx;
77 Standard_Real aMajorRadius, aMinorRadius;
78
79 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
80
81 theElips.SetAxis (anAx);
82 theElips.SetMajorRadius (aMajorRadius);
83 theElips.SetMinorRadius (aMinorRadius);
84
85 return theReadData;
86}
87
ec964372 88inline StdObjMgt_WriteData& operator <<
89 (StdObjMgt_WriteData& theWriteData, const gp_Elips2d& theElips)
90{
91 const gp_Ax22d& anAx = theElips.Axis();
92 Standard_Real aMajorRadius = theElips.MajorRadius();
93 Standard_Real aMinorRadius = theElips.MinorRadius();
94 theWriteData << anAx << aMajorRadius << aMinorRadius;
95 return theWriteData;
96}
97
45d8465e 98inline StdObjMgt_ReadData& operator >>
ec964372 99 (StdObjMgt_ReadData& theReadData, gp_Hypr2d& theHypr)
45d8465e 100{
101 gp_Ax22d anAx;
102 Standard_Real aMajorRadius, aMinorRadius;
103
104 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
105
106 theHypr.SetAxis (anAx);
107 theHypr.SetMajorRadius (aMajorRadius);
108 theHypr.SetMinorRadius (aMinorRadius);
109
110 return theReadData;
111}
112
ec964372 113inline StdObjMgt_WriteData& operator <<
114 (StdObjMgt_WriteData& theWriteData, const gp_Hypr2d& theHypr)
115{
116 const gp_Ax22d& anAx = theHypr.Axis();
117 Standard_Real aMajorRadius = theHypr.MajorRadius();
118 Standard_Real aMinorRadius = theHypr.MinorRadius();
119 theWriteData << anAx << aMajorRadius << aMinorRadius;
120 return theWriteData;
121}
122
45d8465e 123inline StdObjMgt_ReadData& operator >>
ec964372 124 (StdObjMgt_ReadData& theReadData, gp_Parab2d& theParab)
45d8465e 125{
126 gp_Ax22d anAx;
127 Standard_Real aFocalLength;
128
129 theReadData >> anAx >> aFocalLength;
130
131 theParab.SetAxis (anAx);
132 theParab.SetFocal (aFocalLength);
133
134 return theReadData;
135}
136
ec964372 137inline StdObjMgt_WriteData& operator <<
138 (StdObjMgt_WriteData& theWriteData, const gp_Parab2d& theParab)
139{
140 const gp_Ax22d& anAx = theParab.Axis();
141 Standard_Real aFocalLength = theParab.Focal();
142 theWriteData << anAx << aFocalLength;
143 return theWriteData;
144}
145
45d8465e 146inline StdObjMgt_ReadData& operator >>
ec964372 147 (StdObjMgt_ReadData& theReadData, gp_Lin& theLin)
45d8465e 148{
149 gp_Ax1 anAx;
150 theReadData >> anAx;
151 theLin.SetPosition (anAx);
152 return theReadData;
153}
154
ec964372 155inline StdObjMgt_WriteData& operator <<
156 (StdObjMgt_WriteData& theWriteData, const gp_Lin& theLin)
157{
158 const gp_Ax1& anAx = theLin.Position();
159 write (theWriteData, anAx);
160 return theWriteData;
161}
162
45d8465e 163inline StdObjMgt_ReadData& operator >>
ec964372 164 (StdObjMgt_ReadData& theReadData, gp_Circ& theCirc)
45d8465e 165{
166 gp_Ax2 anAx;
167 Standard_Real aRadius;
168
169 theReadData >> anAx >> aRadius;
170
171 theCirc.SetPosition (anAx);
172 theCirc.SetRadius (aRadius);
173
174 return theReadData;
175}
176
ec964372 177inline StdObjMgt_WriteData& operator <<
178 (StdObjMgt_WriteData& theWriteData, const gp_Circ& theCirc)
179{
180 const gp_Ax2& anAx = theCirc.Position();
181 Standard_Real aRadius = theCirc.Radius();
182 theWriteData << anAx << aRadius;
183 return theWriteData;
184}
185
45d8465e 186inline StdObjMgt_ReadData& operator >>
ec964372 187 (StdObjMgt_ReadData& theReadData, gp_Elips& theElips)
45d8465e 188{
189 gp_Ax2 anAx;
190 Standard_Real aMajorRadius, aMinorRadius;
191
192 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
193
194 theElips.SetPosition (anAx);
195 theElips.SetMajorRadius (aMajorRadius);
196 theElips.SetMinorRadius (aMinorRadius);
197
198 return theReadData;
199}
200
ec964372 201inline StdObjMgt_WriteData& operator <<
202 (StdObjMgt_WriteData& theWriteData, const gp_Elips& theElips)
203{
204 const gp_Ax2& anAx = theElips.Position();
205 Standard_Real aMajorRadius = theElips.MajorRadius();
206 Standard_Real aMinorRadius = theElips.MinorRadius();
207 theWriteData << anAx << aMajorRadius << aMinorRadius;
208 return theWriteData;
209}
210
45d8465e 211inline StdObjMgt_ReadData& operator >>
ec964372 212 (StdObjMgt_ReadData& theReadData, gp_Hypr& theHypr)
45d8465e 213{
214 gp_Ax2 anAx;
215 Standard_Real aMajorRadius, aMinorRadius;
216
217 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
218
219 theHypr.SetPosition (anAx);
220 theHypr.SetMajorRadius (aMajorRadius);
221 theHypr.SetMinorRadius (aMinorRadius);
222
223 return theReadData;
224}
225
ec964372 226inline StdObjMgt_WriteData& operator <<
227 (StdObjMgt_WriteData& theWriteData, const gp_Hypr& theHypr)
228{
229 const gp_Ax2& anAx = theHypr.Position();
230 Standard_Real aMajorRadius = theHypr.MajorRadius();
231 Standard_Real aMinorRadius = theHypr.MinorRadius();
232 theWriteData << anAx << aMajorRadius << aMinorRadius;
233 return theWriteData;
234}
235
45d8465e 236inline StdObjMgt_ReadData& operator >>
ec964372 237 (StdObjMgt_ReadData& theReadData, gp_Parab& theParab)
45d8465e 238{
239 gp_Ax2 anAx;
240 Standard_Real aFocalLength;
241
242 theReadData >> anAx >> aFocalLength;
243
244 theParab.SetPosition (anAx);
245 theParab.SetFocal (aFocalLength);
246
247 return theReadData;
248}
249
ec964372 250inline StdObjMgt_WriteData& operator <<
251(StdObjMgt_WriteData& theWriteData, const gp_Parab& theParab)
252{
253 const gp_Ax2& anAx = theParab.Position();
254 Standard_Real aFocalLength = theParab.Focal();
255 theWriteData << anAx << aFocalLength;
256 return theWriteData;
257}
258
45d8465e 259
260#endif