1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License 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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
16 #include <TCollection_AsciiString.hxx>
17 #include <Vrml_WWWInline.hxx>
19 Vrml_WWWInline::Vrml_WWWInline()
24 myBboxCenter = tmpVec;
27 Vrml_WWWInline::Vrml_WWWInline(const TCollection_AsciiString& aName,
28 const gp_Vec& aBboxSize,
29 const gp_Vec& aBboxCenter)
32 myBboxSize = aBboxSize;
33 myBboxCenter = aBboxCenter;
36 void Vrml_WWWInline::SetName(const TCollection_AsciiString& aName)
41 TCollection_AsciiString Vrml_WWWInline::Name() const
46 void Vrml_WWWInline::SetBboxSize(const gp_Vec& aBboxSize)
48 myBboxSize = aBboxSize;
51 gp_Vec Vrml_WWWInline::BboxSize() const
56 void Vrml_WWWInline::SetBboxCenter(const gp_Vec& aBboxCenter)
58 myBboxCenter = aBboxCenter;
61 gp_Vec Vrml_WWWInline::BboxCenter() const
66 Standard_OStream& Vrml_WWWInline::Print(Standard_OStream& anOStream) const
68 anOStream << "WWWInline {\n";
70 if ( !(myName.IsEqual ("") ) )
72 anOStream << " name\t";
73 anOStream << '"' << myName << '"' << "\n";
76 if ( Abs(myBboxSize.X() - 0) > 0.0001 ||
77 Abs(myBboxSize.Y() - 0) > 0.0001 ||
78 Abs(myBboxSize.Z() - 0) > 0.0001 )
80 anOStream << " bboxSize\t";
81 anOStream << myBboxSize.X() << " " << myBboxSize.Y() << " " << myBboxSize.Z() << "\n";
84 if ( Abs(myBboxCenter.X() - 0) > 0.0001 ||
85 Abs(myBboxCenter.Y() - 0) > 0.0001 ||
86 Abs(myBboxCenter.Z() - 0) > 0.0001 )
88 anOStream << " bboxCenter\t";
89 anOStream << myBboxCenter.X() << " " << myBboxCenter.Y() << " " << myBboxCenter.Z() << "\n";