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 =========================================================================*/
36 #ifndef vtkPBRIrradianceTexture_h
37 #define vtkPBRIrradianceTexture_h
38 
39 #include "vtkOpenGLTexture.h"
40 #include "vtkRenderingOpenGL2Module.h" // For export macro
41 
44 class vtkOpenGLTexture;
45 class vtkRenderWindow;
46 
47 class VTKRENDERINGOPENGL2_EXPORT vtkPBRIrradianceTexture : public vtkOpenGLTexture
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
59  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
61 
65  void Load(vtkRenderer*) override;
66 
70  void Render(vtkRenderer* ren) override { this->Load(ren); }
71 
73 
77  vtkGetMacro(IrradianceSize, unsigned int);
78  vtkSetMacro(IrradianceSize, unsigned int);
80 
82 
88  vtkGetMacro(IrradianceStep, float);
89  vtkSetMacro(IrradianceStep, float);
91 
93 
98  vtkGetMacro(ConvertToLinear, bool);
99  vtkSetMacro(ConvertToLinear, bool);
100  vtkBooleanMacro(ConvertToLinear, bool);
102 
110 
111 protected:
114 
115  float IrradianceStep = 0.04908738521; // pi / 64
116  unsigned int IrradianceSize = 256;
117  vtkOpenGLTexture* InputTexture = nullptr;
118  bool ConvertToLinear = false;
119 
120 private:
122  void operator=(const vtkPBRIrradianceTexture&) = delete;
123 };
124 
125 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
Internal class which encapsulates OpenGL FramebufferObject.
OpenGL rendering window.
OpenGL texture map.
void Load(vtkRenderer *) override
Implement base class method.
precompute irradiance texture used in physically based rendering
void Render(vtkRenderer *ren) override
Implement base class method.
static vtkPBRIrradianceTexture * New()
vtkPBRIrradianceTexture()=default
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this texture.
void Load(vtkRenderer *) override
Implement base class method.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkPBRIrradianceTexture() override
void SetInputTexture(vtkOpenGLTexture *texture)
Get/Set the input texture.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:82
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48