VTK  9.2.6
vtkPBRIrradianceTexture.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPBRIrradianceTexture.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkPBRIrradianceTexture_h
28 #define vtkPBRIrradianceTexture_h
29 
30 #include "vtkOpenGLTexture.h"
31 #include "vtkRenderingOpenGL2Module.h" // For export macro
32 
35 class vtkOpenGLTexture;
36 class vtkRenderWindow;
37 
38 class VTKRENDERINGOPENGL2_EXPORT vtkPBRIrradianceTexture : public vtkOpenGLTexture
39 {
40 public:
41  static vtkPBRIrradianceTexture* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  void SetInputTexture(vtkOpenGLTexture* texture);
50  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
52 
56  void Load(vtkRenderer*) override;
57 
61  void Render(vtkRenderer* ren) override { this->Load(ren); }
62 
64 
68  vtkGetMacro(IrradianceSize, unsigned int);
69  vtkSetMacro(IrradianceSize, unsigned int);
71 
73 
79  vtkGetMacro(IrradianceStep, float);
80  vtkSetMacro(IrradianceStep, float);
82 
84 
89  vtkGetMacro(ConvertToLinear, bool);
90  vtkSetMacro(ConvertToLinear, bool);
91  vtkBooleanMacro(ConvertToLinear, bool);
93 
100  void ReleaseGraphicsResources(vtkWindow*) override;
101 
102 protected:
103  vtkPBRIrradianceTexture() = default;
104  ~vtkPBRIrradianceTexture() override;
105 
106  float IrradianceStep = 0.04908738521; // pi / 64
107  unsigned int IrradianceSize = 256;
108  vtkOpenGLTexture* InputTexture = nullptr;
109  bool ConvertToLinear = false;
110 
111 private:
113  void operator=(const vtkPBRIrradianceTexture&) = delete;
114 };
115 
116 #endif
OpenGL rendering window.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract specification for renderers
Definition: vtkRenderer.h:72
void Load(vtkRenderer *) override
Implement base class method.
OpenGL texture map.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
a simple class to control print indentation
Definition: vtkIndent.h:39
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
Internal class which encapsulates OpenGL FramebufferObject.
create a window for renderers to draw into
void Render(vtkRenderer *ren) override
Implement base class method.
static vtkOpenGLTexture * New()
precompute irradiance texture used in physically based rendering