summaryrefslogtreecommitdiff
path: root/src/Vrml/Vrml_Translation.cxx
blob: 97d5a1775110f6ce64ce10546832dbb741e9cfa1 (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
#include <Vrml_Translation.ixx>

Vrml_Translation::Vrml_Translation()
{
  gp_Vec tmpV(0,0,0);
  myTranslation = tmpV;
}

Vrml_Translation::Vrml_Translation(const gp_Vec& aTranslation)
{
  myTranslation = aTranslation;
}

 void Vrml_Translation::SetTranslation(const gp_Vec& aTranslation) 
{
  myTranslation = aTranslation;
}

 gp_Vec Vrml_Translation::Translation() const
{
  return myTranslation;
}

 Standard_OStream& Vrml_Translation::Print(Standard_OStream& anOStream) const
{
 anOStream  << "Translation {" << endl;

 if ( Abs(myTranslation.X() - 0) > 0.0001 || 
     Abs(myTranslation.Y() - 0) > 0.0001 || 
     Abs(myTranslation.Z() - 0) > 0.0001 ) 
   {
    anOStream  << "    translation" << '\t';
    anOStream << myTranslation.X() << ' ' << myTranslation.Y() << ' ' << myTranslation.Z() << endl;
   }

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