Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:16:37

0001 // Created on: 1991-10-07
0002 // Created by: NW,JPB,CAL
0003 // Copyright (c) 1991-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Graphic3d_TypeOfShadingModel_HeaderFile
0018 #define _Graphic3d_TypeOfShadingModel_HeaderFile
0019 
0020 //! Definition of the color shading model.
0021 enum Graphic3d_TypeOfShadingModel
0022 {
0023   //! Use Shading Model, specified as default for entire Viewer.
0024   Graphic3d_TypeOfShadingModel_DEFAULT = -1,
0025 
0026   //! Unlit Shading (or shadeless), lighting is ignored and facet is fully filled by its material
0027   //! color. This model is useful for artificial/auxiliary objects, not intended to be lit, or for
0028   //! objects with pre-calculated lighting information (e.g. captured by camera).
0029   Graphic3d_TypeOfShadingModel_Unlit = 0,
0030 
0031   //! Flat Shading for Phong material model, calculated using triangle normal.
0032   //! Could be useful for mesh element analysis.
0033   //! This shading model does NOT require normals to be defined within vertex attributes.
0034   Graphic3d_TypeOfShadingModel_PhongFacet,
0035 
0036   //! Gouraud shading uses the same material definition as Phong reflection model,
0037   //! but emulates an obsolete per-vertex calculations with result color interpolated across
0038   //! fragments, as implemented by T&L hardware blocks on old graphics hardware. This shading model
0039   //! requires normals to be defined within vertex attributes.
0040   Graphic3d_TypeOfShadingModel_Gouraud,
0041 
0042   //! Phong reflection model, an empirical model defined by Diffuse/Ambient/Specular/Shininess
0043   //! components. Lighting is calculated per-fragment basing on nodal normal (normal is interpolated
0044   //! across fragments of triangle). This shading model requires normals to be defined within vertex
0045   //! attributes.
0046   Graphic3d_TypeOfShadingModel_Phong,
0047 
0048   //! Metallic-roughness physically based (PBR) illumination system.
0049   Graphic3d_TypeOfShadingModel_Pbr,
0050 
0051   //! Same as Graphic3d_TypeOfShadingModel_Pbr but using flat per-triangle normal.
0052   Graphic3d_TypeOfShadingModel_PbrFacet,
0053 
0054   // obsolete aliases
0055   Graphic3d_TOSM_DEFAULT   = Graphic3d_TypeOfShadingModel_DEFAULT,
0056   Graphic3d_TOSM_UNLIT     = Graphic3d_TypeOfShadingModel_Unlit,
0057   Graphic3d_TOSM_FACET     = Graphic3d_TypeOfShadingModel_PhongFacet,
0058   Graphic3d_TOSM_VERTEX    = Graphic3d_TypeOfShadingModel_Gouraud,
0059   Graphic3d_TOSM_FRAGMENT  = Graphic3d_TypeOfShadingModel_Phong,
0060   Graphic3d_TOSM_PBR       = Graphic3d_TypeOfShadingModel_Pbr,
0061   Graphic3d_TOSM_PBR_FACET = Graphic3d_TypeOfShadingModel_PbrFacet,
0062   //
0063   Graphic3d_TOSM_NONE = Graphic3d_TOSM_UNLIT,
0064   V3d_COLOR           = Graphic3d_TOSM_NONE,
0065   V3d_FLAT            = Graphic3d_TOSM_FACET,
0066   V3d_GOURAUD         = Graphic3d_TOSM_VERTEX,
0067   V3d_PHONG           = Graphic3d_TOSM_FRAGMENT
0068 };
0069 
0070 enum
0071 {
0072   //! Auxiliary value defining the overall number of values in enumeration
0073   //! Graphic3d_TypeOfShadingModel
0074   Graphic3d_TypeOfShadingModel_NB = Graphic3d_TypeOfShadingModel_PbrFacet + 1
0075 };
0076 
0077 #endif // _Graphic3d_TypeOfShadingModel_HeaderFile