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_Cone.hxx>
17 Vrml_Cone::Vrml_Cone(const Vrml_ConeParts aParts,
18 const Standard_Real aBottomRadius,
19 const Standard_Real aHeight)
22 myBottomRadius = aBottomRadius;
26 void Vrml_Cone::SetParts(const Vrml_ConeParts aParts)
31 Vrml_ConeParts Vrml_Cone::Parts() const
36 void Vrml_Cone::SetBottomRadius(const Standard_Real aBottomRadius)
38 myBottomRadius = aBottomRadius;
41 Standard_Real Vrml_Cone::BottomRadius() const
43 return myBottomRadius;
46 void Vrml_Cone::SetHeight(const Standard_Real aHeight)
51 Standard_Real Vrml_Cone::Height() const
56 Standard_OStream& Vrml_Cone::Print(Standard_OStream& anOStream) const
58 anOStream << "Cone {\n";
62 case Vrml_ConeALL: break; // anOStream << " parts\t\tALL ";
63 case Vrml_ConeSIDES: anOStream << " parts\t\tSIDES\n"; break;
64 case Vrml_ConeBOTTOM: anOStream << " parts\t\tBOTTOM\n"; break;
67 if ( Abs(myBottomRadius - 1 ) > 0.0001 )
69 anOStream << " bottomRadius\t";
70 anOStream << myBottomRadius << "\n";
73 if ( Abs(myHeight - 2 ) > 0.0001 )
75 anOStream << " height\t\t";
76 anOStream << myHeight << "\n";