VTK  9.3.0
vtkPBRIrradianceTexture.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
24 #ifndef vtkPBRIrradianceTexture_h
25 #define vtkPBRIrradianceTexture_h
26 
27 #include "vtkOpenGLTexture.h"
28 #include "vtkRenderingOpenGL2Module.h" // For export macro
29 
30 VTK_ABI_NAMESPACE_BEGIN
33 class vtkOpenGLTexture;
34 class vtkRenderWindow;
35 
36 class VTKRENDERINGOPENGL2_EXPORT vtkPBRIrradianceTexture : public vtkOpenGLTexture
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
48  vtkGetObjectMacro(InputTexture, vtkOpenGLTexture);
50 
54  void Load(vtkRenderer*) override;
55 
59  void Render(vtkRenderer* ren) override { this->Load(ren); }
60 
62 
66  vtkGetMacro(IrradianceSize, unsigned int);
67  vtkSetMacro(IrradianceSize, unsigned int);
69 
71 
77  vtkGetMacro(IrradianceStep, float);
78  vtkSetMacro(IrradianceStep, float);
80 
82 
87  vtkGetMacro(ConvertToLinear, bool);
88  vtkSetMacro(ConvertToLinear, bool);
89  vtkBooleanMacro(ConvertToLinear, bool);
91 
99 
100 protected:
103 
104  float IrradianceStep = 0.04908738521; // pi / 64
105  unsigned int IrradianceSize = 256;
106  vtkOpenGLTexture* InputTexture = nullptr;
107  bool ConvertToLinear = false;
108 
109 private:
111  void operator=(const vtkPBRIrradianceTexture&) = delete;
112 };
113 
114 VTK_ABI_NAMESPACE_END
115 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
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:71
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37