1 // Author: Kirill Gavrilov
2 // Copyright (c) 2016-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 _RWGltf_MaterialCommon_HeaderFile
16 #define _RWGltf_MaterialCommon_HeaderFile
18 #include <Image_Texture.hxx>
19 #include <Quantity_ColorRGBA.hxx>
21 //! glTF 1.0 format common (obsolete) material definition.
22 class RWGltf_MaterialCommon : public Standard_Transient
26 Handle(Image_Texture) AmbientTexture; //!< image defining ambient color
27 Handle(Image_Texture) DiffuseTexture; //!< image defining diffuse color
28 Handle(Image_Texture) SpecularTexture; //!< image defining specular color
29 TCollection_AsciiString Id; //!< material identifier
30 TCollection_AsciiString Name; //!< material name
31 Quantity_Color AmbientColor;
32 Quantity_Color DiffuseColor;
33 Quantity_Color SpecularColor;
34 Quantity_Color EmissiveColor;
35 Standard_ShortReal Shininess;
36 Standard_ShortReal Transparency;
38 RWGltf_MaterialCommon()
39 : AmbientColor (0.1, 0.1, 0.1, Quantity_TOC_sRGB),
40 DiffuseColor (0.8, 0.8, 0.8, Quantity_TOC_sRGB),
41 SpecularColor(0.2, 0.2, 0.2, Quantity_TOC_sRGB),
42 EmissiveColor(Quantity_NOC_BLACK),
44 Transparency (0.0f) {}
48 #endif // _RWGltf_MaterialCommon_HeaderFile