summaryrefslogtreecommitdiff
path: root/src/Vrml/Vrml_Cube.cxx
blob: 7cdac2d97eb8af0da54fa878a02c45be84cce135 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <Vrml_Cube.ixx>

Vrml_Cube::Vrml_Cube(const Standard_Real aWidth,
		     const Standard_Real aHeight,
		     const Standard_Real aDepth)
{
    myWidth = aWidth;
    myHeight = aHeight;
    myDepth = aDepth;
}

 void Vrml_Cube::SetWidth(const Standard_Real aWidth) 
{
    myWidth = aWidth;
}

 Standard_Real Vrml_Cube::Width() const
{
  return myWidth;
}

 void Vrml_Cube::SetHeight(const Standard_Real aHeight) 
{
    myHeight = aHeight;
}

 Standard_Real Vrml_Cube::Height() const
{
  return myHeight;
}

 void Vrml_Cube::SetDepth(const Standard_Real aDepth) 
{
    myDepth = aDepth;
}

 Standard_Real Vrml_Cube::Depth() const
{
  return myDepth;
}

 Standard_OStream& Vrml_Cube::Print(Standard_OStream& anOStream) const
{
 anOStream  << "Cube {" << endl;

 if ( Abs(myWidth - 2) > 0.0001 )
   {
    anOStream  << "    width" << '\t';
    anOStream << myWidth << endl;
   }

 if ( Abs(myHeight - 2) > 0.0001 )
   {
    anOStream  << "    height" << '\t';
    anOStream << myHeight << endl;
   }

 if ( Abs(myDepth - 2) > 0.0001 )
   {
    anOStream  << "    depth" << '\t';
    anOStream << myDepth << endl;
   }

 anOStream  << '}' << endl;
 return anOStream;

}