6f8478f57946beaddebd5bc18d363ccbb6409114
[occt.git] / src / Graphic3d / Graphic3d_RenderingParams.hxx
1 // Created on: 2014-05-14
2 // Created by: Denis BOGOLEPOV
3 // Copyright (c) 2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _Graphic3d_RenderingParams_HeaderFile
17 #define _Graphic3d_RenderingParams_HeaderFile
18
19 #include <Graphic3d_RenderingMode.hxx>
20
21 //! Helper class to store rendering parameters.
22 class Graphic3d_RenderingParams
23 {
24 public:
25
26   //! Default number of samples per pixel.
27   static const Standard_Integer THE_DEFAULT_SPP = 1;
28
29   //! Default ray-tracing depth.
30   static const Standard_Integer THE_DEFAULT_DEPTH = 3;
31
32 public:
33
34   //! Creates default rendering parameters.
35   Graphic3d_RenderingParams()
36   : Method                      (Graphic3d_RM_RASTERIZATION),
37     RaytracingDepth             (THE_DEFAULT_DEPTH),
38     SamplesPerPixel             (THE_DEFAULT_SPP),
39     IsShadowEnabled             (Standard_True),
40     IsReflectionEnabled         (Standard_False),
41     IsAntialiasingEnabled       (Standard_False),
42     IsTransparentShadowEnabled  (Standard_False),
43     IsGlobalIlluminationEnabled (Standard_False),
44     UseEnvironmentMapBackground (Standard_False)
45   {
46     //
47   }
48
49 public:
50
51   //! Specifies rendering mode.
52   Graphic3d_RenderingMode Method;
53
54   //! Maximum ray-tracing depth.
55   Standard_Integer RaytracingDepth;
56
57   //! Number of samples per pixel (SPP).
58   Standard_Integer SamplesPerPixel;
59
60   //! Enables/disables shadows rendering.
61   Standard_Boolean IsShadowEnabled;
62
63   //! Enables/disables specular reflections.
64   Standard_Boolean IsReflectionEnabled;
65   
66   //! Enables/disables adaptive anti-aliasing.
67   Standard_Boolean IsAntialiasingEnabled;
68
69   //! Enables/disables light propagation through transparent media.
70   Standard_Boolean IsTransparentShadowEnabled;
71
72   //! Enables/disables global illumination effects (uses path tracing).
73   Standard_Boolean IsGlobalIlluminationEnabled;
74
75   //! Enables/disables environment map background (instead of OCCT background).
76   Standard_Boolean UseEnvironmentMapBackground;
77
78 };
79
80 #endif // _Graphic3d_RenderingParams_HeaderFile