File indexing completed on 2025-01-18 10:04:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _RWObj_MtlReader_HeaderFile
0016 #define _RWObj_MtlReader_HeaderFile
0017
0018 #include <Graphic3d_Vec3.hxx>
0019 #include <RWObj_Material.hxx>
0020 #include <NCollection_DataMap.hxx>
0021
0022
0023 class RWObj_MtlReader
0024 {
0025 public:
0026
0027
0028 RWObj_MtlReader (NCollection_DataMap<TCollection_AsciiString, RWObj_Material>& theMaterials);
0029
0030
0031 ~RWObj_MtlReader();
0032
0033
0034 bool Read (const TCollection_AsciiString& theFolder,
0035 const TCollection_AsciiString& theFile);
0036
0037 private:
0038
0039
0040 bool validateScalar (const Standard_Real theValue);
0041
0042
0043 bool validateColor (const Graphic3d_Vec3& theVec);
0044
0045
0046 void processTexturePath (TCollection_AsciiString& theTexturePath,
0047 const TCollection_AsciiString& theFolder);
0048
0049 private:
0050
0051 FILE* myFile;
0052 TCollection_AsciiString myPath;
0053 NCollection_DataMap<TCollection_AsciiString, RWObj_Material>* myMaterials;
0054 int myNbLines;
0055
0056 };
0057
0058 #endif