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 _RWGltf_MaterialMetallicRoughness_HeaderFile
16 #define _RWGltf_MaterialMetallicRoughness_HeaderFile
18 #include <Graphic3d_Vec.hxx>
19 #include <Quantity_ColorRGBA.hxx>
20 #include <Standard_Transient.hxx>
21 #include <TCollection_AsciiString.hxx>
25 //! glTF 2.0 format PBR material definition.
26 class RWGltf_MaterialMetallicRoughness : public Standard_Transient
30 Handle(Image_Texture) BaseColorTexture; //!< RGB texture for the base color
31 Handle(Image_Texture) MetallicRoughnessTexture; //!< RG texture packing the metallic and roughness properties together
32 Handle(Image_Texture) EmissiveTexture; //!< RGB emissive map controls the color and intensity of the light being emitted by the material
33 Handle(Image_Texture) OcclusionTexture; //!< R occlusion map indicating areas of indirect lighting
34 Handle(Image_Texture) NormalTexture; //!< normal map
35 TCollection_AsciiString Id; //!< material identifier
36 TCollection_AsciiString Name; //!< material name
37 Quantity_ColorRGBA BaseColor; //!< base color (or scale factor to the texture); [1.0, 1.0, 1.0, 1.0] by default
38 Graphic3d_Vec3 EmissiveFactor; //!< emissive color; [0.0, 0.0, 0.0] by default
39 Standard_ShortReal Metallic; //!< metalness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default
40 Standard_ShortReal Roughness; //!< roughness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default
42 RWGltf_MaterialMetallicRoughness()
43 : BaseColor (1.0f, 1.0f, 1.0f, 1.0f),
44 EmissiveFactor (0.0f, 0.0f, 0.0f),
50 #endif // _RWGltf_MaterialMetallicRoughness_HeaderFile