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 <Standard_Type.hxx>
17 #include <Vrml_LOD.hxx>
21 myRange = new TColStd_HArray1OfReal(1,1);
24 myRangeFlag = Standard_False;
27 Vrml_LOD::Vrml_LOD(const Handle(TColStd_HArray1OfReal)& aRange,
28 const gp_Vec& aCenter)
32 myRangeFlag = Standard_True;
35 void Vrml_LOD::SetRange(const Handle(TColStd_HArray1OfReal)& aRange)
38 myRangeFlag = Standard_True;
41 Handle(TColStd_HArray1OfReal) Vrml_LOD::Range() const
46 void Vrml_LOD::SetCenter(const gp_Vec& aCenter)
51 gp_Vec Vrml_LOD::Center() const
56 Standard_OStream& Vrml_LOD::Print(Standard_OStream& anOStream) const
59 anOStream << "LOD {\n";
61 if ( myRangeFlag == Standard_True )
63 anOStream << " range [\n\t";
64 for ( i = myRange->Lower(); i <= myRange->Upper(); i++ )
66 anOStream << myRange->Value(i);
67 if ( i < myRange->Length() )
73 if ( Abs(myCenter.X() - 0) > 0.0001 ||
74 Abs(myCenter.Y() - 0) > 0.0001 ||
75 Abs(myCenter.Z() - 0) > 0.0001 )
77 anOStream << " center\t";
78 anOStream << myCenter.X() << " " << myCenter.Y() << " " << myCenter.Z() << "\n";