0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
[occt.git] / src / Graphic3d / Graphic3d_MaterialAspect.hxx
index 99d25ea..997b36e 100644 (file)
@@ -17,6 +17,7 @@
 #define _Graphic3d_MaterialAspect_HeaderFile
 
 #include <Graphic3d_BSDF.hxx>
+#include <Graphic3d_PBRMaterial.hxx>
 #include <Graphic3d_NameOfMaterial.hxx>
 #include <Graphic3d_TypeOfMaterial.hxx>
 #include <Graphic3d_TypeOfReflection.hxx>
@@ -170,6 +171,12 @@ public:
   //! Modifies the BSDF (bidirectional scattering distribution function).
   void SetBSDF (const Graphic3d_BSDF& theBSDF) { myBSDF = theBSDF; }
 
+  //! Returns physically based representation of material
+  const Graphic3d_PBRMaterial& PBRMaterial () const { return myPBRMaterial; }
+
+  //! Modifies the physically based representation of material
+  void SetPBRMaterial (const Graphic3d_PBRMaterial& thePBRMaterial) { myPBRMaterial = thePBRMaterial; }
+
   //! Returns TRUE if the reflection mode is active, FALSE otherwise.
   Standard_Boolean ReflectionMode (const Graphic3d_TypeOfReflection theType) const
   {
@@ -197,6 +204,7 @@ public:
     return myTransparencyCoef == theOther.myTransparencyCoef
         && myRefractionIndex  == theOther.myRefractionIndex
         && myBSDF             == theOther.myBSDF
+        && myPBRMaterial      == theOther.myPBRMaterial
         && myShininess        == theOther.myShininess
         && myColors[Graphic3d_TOR_AMBIENT]  == theOther.myColors[Graphic3d_TOR_AMBIENT]
         && myColors[Graphic3d_TOR_DIFFUSE]  == theOther.myColors[Graphic3d_TOR_DIFFUSE]
@@ -247,6 +255,7 @@ private:
 private:
 
   Graphic3d_BSDF           myBSDF;
+  Graphic3d_PBRMaterial    myPBRMaterial;
   TCollection_AsciiString  myStringName;
   Quantity_Color           myColors[Graphic3d_TypeOfReflection_NB];
   Standard_ShortReal       myTransparencyCoef;