blob: f50484c6e612c40aa8e93b32b88dfca3ad25f0e7 (
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_Cone.ixx>
Vrml_Cone::Vrml_Cone(const Vrml_ConeParts aParts,
const Standard_Real aBottomRadius,
const Standard_Real aHeight)
{
myParts = aParts;
myBottomRadius = aBottomRadius;
myHeight = aHeight;
}
void Vrml_Cone::SetParts(const Vrml_ConeParts aParts)
{
myParts = aParts;
}
Vrml_ConeParts Vrml_Cone::Parts() const
{
return myParts;
}
void Vrml_Cone::SetBottomRadius(const Standard_Real aBottomRadius)
{
myBottomRadius = aBottomRadius;
}
Standard_Real Vrml_Cone::BottomRadius() const
{
return myBottomRadius;
}
void Vrml_Cone::SetHeight(const Standard_Real aHeight)
{
myHeight = aHeight;
}
Standard_Real Vrml_Cone::Height() const
{
return myHeight;
}
Standard_OStream& Vrml_Cone::Print(Standard_OStream& anOStream) const
{
anOStream << "Cone {" << endl;
switch ( myParts )
{
case Vrml_ConeALL: break; // anOStream << " parts" << "\t\tALL ";
case Vrml_ConeSIDES: anOStream << " parts" << "\t\tSIDES" << endl; break;
case Vrml_ConeBOTTOM: anOStream << " parts" << "\t\tBOTTOM" << endl; break;
}
if ( Abs(myBottomRadius - 1 ) > 0.0001 )
{
anOStream << " bottomRadius" << '\t';
anOStream << myBottomRadius << endl;
}
if ( Abs(myHeight - 2 ) > 0.0001 )
{
anOStream << " height" << "\t\t";
anOStream << myHeight << endl;
}
anOStream << '}' << endl;
return anOStream;
}
|