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.
14 #include <Vrml_Cube.ixx>
16 Vrml_Cube::Vrml_Cube(const Standard_Real aWidth,
17 const Standard_Real aHeight,
18 const Standard_Real aDepth)
25 void Vrml_Cube::SetWidth(const Standard_Real aWidth)
30 Standard_Real Vrml_Cube::Width() const
35 void Vrml_Cube::SetHeight(const Standard_Real aHeight)
40 Standard_Real Vrml_Cube::Height() const
45 void Vrml_Cube::SetDepth(const Standard_Real aDepth)
50 Standard_Real Vrml_Cube::Depth() const
55 Standard_OStream& Vrml_Cube::Print(Standard_OStream& anOStream) const
57 anOStream << "Cube {" << endl;
59 if ( Abs(myWidth - 2) > 0.0001 )
61 anOStream << " width" << '\t';
62 anOStream << myWidth << endl;
65 if ( Abs(myHeight - 2) > 0.0001 )
67 anOStream << " height" << '\t';
68 anOStream << myHeight << endl;
71 if ( Abs(myDepth - 2) > 0.0001 )
73 anOStream << " depth" << '\t';
74 anOStream << myDepth << endl;
77 anOStream << '}' << endl;