0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / Vrml / Vrml_Rotation.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
973c2be1 5// This library is free software; you can redistribute it and / or modify it
6// under the terms of the GNU Lesser General Public 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.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14#include <Vrml_Rotation.ixx>
15
16Vrml_Rotation::Vrml_Rotation()
17{
18 Vrml_SFRotation tmpR(0,0,1,0);
19 myRotation = tmpR;
20}
21
22Vrml_Rotation::Vrml_Rotation(const Vrml_SFRotation& aRotation)
23{
24 myRotation = aRotation;
25}
26
27 void Vrml_Rotation::SetRotation(const Vrml_SFRotation& aRotation)
28{
29 myRotation = aRotation;
30}
31
32 Vrml_SFRotation Vrml_Rotation::Rotation() const
33{
34 return myRotation;
35}
36
37 Standard_OStream& Vrml_Rotation::Print(Standard_OStream& anOStream) const
38{
39 anOStream << "Rotation {" << endl;
40
41 if ( Abs(myRotation.RotationX() - 0) > 0.0001 ||
42 Abs(myRotation.RotationY() - 0) > 0.0001 ||
43 Abs(myRotation.RotationZ() - 1) > 0.0001 ||
44 Abs(myRotation.Angle() - 0) > 0.0001 )
45 {
46 anOStream << " rotation" << '\t';
47 anOStream << myRotation.RotationX() << ' ' << myRotation.RotationY() << ' ';
48 anOStream << myRotation.RotationZ() << ' ' << myRotation.Angle() << endl;
49 }
50
51 anOStream << '}' << endl;
52 return anOStream;
53}