1 // Author: Kirill Gavrilov
2 // Copyright (c) 2015-2019 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _RWObj_MtlReader_HeaderFile
16 #define _RWObj_MtlReader_HeaderFile
18 #include <Graphic3d_Vec3.hxx>
19 #include <RWObj_Material.hxx>
20 #include <NCollection_DataMap.hxx>
22 //! Reader of mtl files.
28 RWObj_MtlReader (NCollection_DataMap<TCollection_AsciiString, RWObj_Material>& theMaterials);
34 bool Read (const TCollection_AsciiString& theFolder,
35 const TCollection_AsciiString& theFile);
39 //! Validate scalar value
40 bool validateScalar (const Standard_Real theValue);
42 //! Validate RGB color
43 bool validateColor (const Graphic3d_Vec3& theVec);
45 //! Process texture path.
46 void processTexturePath (TCollection_AsciiString& theTexturePath,
47 const TCollection_AsciiString& theFolder);
52 TCollection_AsciiString myPath;
53 NCollection_DataMap<TCollection_AsciiString, RWObj_Material>* myMaterials;
58 #endif // _RWObj_MtlReader_HeaderFile