7fd59977 |
1 | #include <Vrml_Rotation.ixx> |
2 | |
3 | Vrml_Rotation::Vrml_Rotation() |
4 | { |
5 | Vrml_SFRotation tmpR(0,0,1,0); |
6 | myRotation = tmpR; |
7 | } |
8 | |
9 | Vrml_Rotation::Vrml_Rotation(const Vrml_SFRotation& aRotation) |
10 | { |
11 | myRotation = aRotation; |
12 | } |
13 | |
14 | void Vrml_Rotation::SetRotation(const Vrml_SFRotation& aRotation) |
15 | { |
16 | myRotation = aRotation; |
17 | } |
18 | |
19 | Vrml_SFRotation Vrml_Rotation::Rotation() const |
20 | { |
21 | return myRotation; |
22 | } |
23 | |
24 | Standard_OStream& Vrml_Rotation::Print(Standard_OStream& anOStream) const |
25 | { |
26 | anOStream << "Rotation {" << endl; |
27 | |
28 | if ( Abs(myRotation.RotationX() - 0) > 0.0001 || |
29 | Abs(myRotation.RotationY() - 0) > 0.0001 || |
30 | Abs(myRotation.RotationZ() - 1) > 0.0001 || |
31 | Abs(myRotation.Angle() - 0) > 0.0001 ) |
32 | { |
33 | anOStream << " rotation" << '\t'; |
34 | anOStream << myRotation.RotationX() << ' ' << myRotation.RotationY() << ' '; |
35 | anOStream << myRotation.RotationZ() << ' ' << myRotation.Angle() << endl; |
36 | } |
37 | |
38 | anOStream << '}' << endl; |
39 | return anOStream; |
40 | } |