1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Vrml_Cylinder.hxx>
17 Vrml_Cylinder::Vrml_Cylinder(const Vrml_CylinderParts aParts,
18 const Standard_Real aRadius,
19 const Standard_Real aHeight)
26 void Vrml_Cylinder::SetParts(const Vrml_CylinderParts aParts)
31 Vrml_CylinderParts Vrml_Cylinder::Parts() const
36 void Vrml_Cylinder::SetRadius(const Standard_Real aRadius)
41 Standard_Real Vrml_Cylinder::Radius() const
46 void Vrml_Cylinder::SetHeight(const Standard_Real aHeight)
51 Standard_Real Vrml_Cylinder::Height() const
56 Standard_OStream& Vrml_Cylinder::Print(Standard_OStream& anOStream) const
58 anOStream << "Cylinder {\n";
62 case Vrml_CylinderALL: break; // anOStream << "\tparts\tALL ";
63 case Vrml_CylinderSIDES: anOStream << " parts\tSIDES\n"; break;
64 case Vrml_CylinderTOP: anOStream << " parts\tTOP\n"; break;
65 case Vrml_CylinderBOTTOM: anOStream << " parts\tBOTTOM\n"; break;
68 if ( Abs(myRadius - 1) > 0.0001 )
70 anOStream << " radius\t";
71 anOStream << myRadius << "\n";
74 if ( Abs(myHeight - 2) > 0.0001 )
76 anOStream << " height\t";
77 anOStream << myHeight << "\n";