0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / StdObject / StdObject_gp_Surfaces.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_Surfaces_HeaderFile
16#define _StdObject_gp_Surfaces_HeaderFile
17
18
19#include <StdObject_gp_Axes.hxx>
20
21#include <gp_Cone.hxx>
22#include <gp_Cylinder.hxx>
23#include <gp_Sphere.hxx>
24#include <gp_Torus.hxx>
25
26
27inline StdObjMgt_ReadData& operator >>
ec964372 28 (StdObjMgt_ReadData& theReadData, gp_Cone& theCone)
45d8465e 29{
30 gp_Ax3 anAx;
31 Standard_Real aRadius, aSemiAngle;
32
33 theReadData >> anAx >> aRadius >> aSemiAngle;
34
35 theCone.SetPosition (anAx);
36 theCone.SetRadius (aRadius);
37 theCone.SetSemiAngle (aSemiAngle);
38
39 return theReadData;
40}
41
ec964372 42inline StdObjMgt_WriteData& operator <<
43 (StdObjMgt_WriteData& theWriteData, const gp_Cone& theCone)
44{
45 const gp_Ax3& anAx = theCone.Position();
46 Standard_Real aRadius = theCone.RefRadius();
47 Standard_Real aSemiAngle = theCone.SemiAngle();
48 theWriteData << anAx << aRadius << aSemiAngle;
49 return theWriteData;
50}
51
45d8465e 52inline StdObjMgt_ReadData& operator >>
ec964372 53 (StdObjMgt_ReadData& theReadData, gp_Cylinder& theCyl)
45d8465e 54{
55 gp_Ax3 anAx;
56 Standard_Real aRadius;
57
58 theReadData >> anAx >> aRadius;
59
60 theCyl.SetPosition (anAx);
61 theCyl.SetRadius (aRadius);
62
63 return theReadData;
64}
65
ec964372 66inline StdObjMgt_WriteData& operator <<
67 (StdObjMgt_WriteData& theWriteData, const gp_Cylinder& theCyl)
68{
69 const gp_Ax3& anAx = theCyl.Position();
70 Standard_Real aRadius = theCyl.Radius();
71 theWriteData << anAx << aRadius;
72 return theWriteData;
73}
74
45d8465e 75inline StdObjMgt_ReadData& operator >>
ec964372 76 (StdObjMgt_ReadData& theReadData, gp_Sphere& theSph)
45d8465e 77{
78 gp_Ax3 anAx;
79 Standard_Real aRadius;
80
81 theReadData >> anAx >> aRadius;
82
83 theSph.SetPosition (anAx);
84 theSph.SetRadius (aRadius);
85
86 return theReadData;
87}
88
ec964372 89inline StdObjMgt_WriteData& operator <<
90(StdObjMgt_WriteData& theWriteData, const gp_Sphere& theSph)
91{
92 const gp_Ax3& anAx = theSph.Position();
93 Standard_Real aRadius = theSph.Radius();
94 theWriteData << anAx << aRadius;
95 return theWriteData;
96}
97
45d8465e 98inline StdObjMgt_ReadData& operator >>
ec964372 99 (StdObjMgt_ReadData& theReadData, gp_Torus& theTorus)
45d8465e 100{
101 gp_Ax3 anAx;
102 Standard_Real aMajorRadius, aMinorRadius;
103
104 theReadData >> anAx >> aMajorRadius >> aMinorRadius;
105
106 theTorus.SetPosition (anAx);
107 theTorus.SetMajorRadius (aMajorRadius);
108 theTorus.SetMinorRadius (aMinorRadius);
109
110 return theReadData;
111}
112
ec964372 113inline StdObjMgt_WriteData& operator <<
114(StdObjMgt_WriteData& theWriteData, const gp_Torus& theTorus)
115{
116 const gp_Ax3& anAx = theTorus.Position();
117 Standard_Real aMajorRadius = theTorus.MajorRadius();
118 Standard_Real aMinorRadius = theTorus.MinorRadius();
119 theWriteData << anAx << aMajorRadius << aMinorRadius;
120 return theWriteData;
121}
122
45d8465e 123
124#endif