Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-24 09:15:04

0001 // Copyright (c) 2015-2021 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _RWObj_ObjMaterialMap_HeaderFiler
0015 #define _RWObj_ObjMaterialMap_HeaderFiler
0016 
0017 #include <NCollection_DataMap.hxx>
0018 #include <RWMesh_MaterialMap.hxx>
0019 
0020 //! Material MTL file writer for OBJ export.
0021 class RWObj_ObjMaterialMap : public RWMesh_MaterialMap
0022 {
0023   DEFINE_STANDARD_RTTIEXT(RWObj_ObjMaterialMap, RWMesh_MaterialMap)
0024 public:
0025   //! Main constructor.
0026   Standard_EXPORT RWObj_ObjMaterialMap(const TCollection_AsciiString& theFile);
0027 
0028   //! Destructor, will emit error message if file was not closed.
0029   Standard_EXPORT ~RWObj_ObjMaterialMap() override;
0030 
0031   //! Add material
0032   Standard_EXPORT TCollection_AsciiString AddMaterial(const XCAFPrs_Style& theStyle) override;
0033 
0034   //! Virtual method actually defining the material (e.g. export to the file).
0035   Standard_EXPORT void DefineMaterial(const XCAFPrs_Style&           theStyle,
0036                                       const TCollection_AsciiString& theKey,
0037                                       const TCollection_AsciiString& theName) override;
0038 
0039 private:
0040   FILE*                                                                    myFile;
0041   NCollection_DataMap<occ::handle<Image_Texture>, TCollection_AsciiString> myImageMap;
0042 };
0043 
0044 #endif // _RWObj_ObjMaterialMap_HeaderFiler