0025748: Parallel version of progress indicator
[occt.git] / src / RWGltf / RWGltf_MaterialMetallicRoughness.hxx
CommitLineData
0a419c51 1// Author: Kirill Gavrilov
2// Copyright (c) 2015-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_MaterialMetallicRoughness_HeaderFile
16#define _RWGltf_MaterialMetallicRoughness_HeaderFile
17
18#include <Graphic3d_Vec.hxx>
19#include <Quantity_ColorRGBA.hxx>
a4815d55 20#include <RWGltf_GltfAlphaMode.hxx>
0a419c51 21#include <Standard_Transient.hxx>
22#include <TCollection_AsciiString.hxx>
23
24class Image_Texture;
25
26//! glTF 2.0 format PBR material definition.
27class RWGltf_MaterialMetallicRoughness : public Standard_Transient
28{
29public:
30
31 Handle(Image_Texture) BaseColorTexture; //!< RGB texture for the base color
32 Handle(Image_Texture) MetallicRoughnessTexture; //!< RG texture packing the metallic and roughness properties together
33 Handle(Image_Texture) EmissiveTexture; //!< RGB emissive map controls the color and intensity of the light being emitted by the material
34 Handle(Image_Texture) OcclusionTexture; //!< R occlusion map indicating areas of indirect lighting
35 Handle(Image_Texture) NormalTexture; //!< normal map
36 TCollection_AsciiString Id; //!< material identifier
37 TCollection_AsciiString Name; //!< material name
38 Quantity_ColorRGBA BaseColor; //!< base color (or scale factor to the texture); [1.0, 1.0, 1.0, 1.0] by default
39 Graphic3d_Vec3 EmissiveFactor; //!< emissive color; [0.0, 0.0, 0.0] by default
40 Standard_ShortReal Metallic; //!< metalness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default
41 Standard_ShortReal Roughness; //!< roughness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default
a4815d55 42 Standard_ShortReal AlphaCutOff; //!< alpha cutoff value; 0.5 by default
43 RWGltf_GltfAlphaMode AlphaMode; //!< alpha mode; RWGltf_GltfAlphaMode_Opaque by default
44 Standard_Boolean IsDoubleSided; //!< specifies whether the material is double sided; FALSE by default
0a419c51 45
a4815d55 46 RWGltf_MaterialMetallicRoughness()
0a419c51 47 : BaseColor (1.0f, 1.0f, 1.0f, 1.0f),
48 EmissiveFactor (0.0f, 0.0f, 0.0f),
a4815d55 49 Metallic (1.0f),
50 Roughness (1.0f),
51 AlphaCutOff (0.5f),
52 AlphaMode (RWGltf_GltfAlphaMode_Opaque),
53 IsDoubleSided (Standard_False) {}
0a419c51 54
55};
56
57#endif // _RWGltf_MaterialMetallicRoughness_HeaderFile