0031332: Data Exchange - RWGltf_CafReader ignores bufferView.byteStride within glTF 2.0
[occt.git] / src / RWGltf / RWGltf_MaterialCommon.hxx
1 // Author: Kirill Gavrilov
2 // Copyright (c) 2016-2019 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
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.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #ifndef _RWGltf_MaterialCommon_HeaderFile
16 #define _RWGltf_MaterialCommon_HeaderFile
17
18 #include <Image_Texture.hxx>
19 #include <Quantity_ColorRGBA.hxx>
20
21 //! glTF 1.0 format common (obsolete) material definition.
22 class RWGltf_MaterialCommon : public Standard_Transient
23 {
24 public:
25
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;
37
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),
43     Shininess (1.0f),
44     Transparency (0.0f) {}
45
46 };
47
48 #endif // _RWGltf_MaterialCommon_HeaderFile