VTK  9.3.0
vtkPanoramicProjectionPass.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
21#ifndef vtkPanoramicProjectionPass_h
22#define vtkPanoramicProjectionPass_h
23
25#include "vtkRenderingOpenGL2Module.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
31
32class VTKRENDERINGOPENGL2_EXPORT vtkPanoramicProjectionPass : public vtkImageProcessingPass
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
42 void Render(const vtkRenderState* s) override;
43
48
50
54 vtkGetMacro(CubeResolution, unsigned int);
55 vtkSetMacro(CubeResolution, unsigned int);
57
61 enum : int
62 {
63 Equirectangular = 1,
64 Azimuthal = 2
65 };
66
68
76 vtkGetMacro(ProjectionType, int);
77 vtkSetClampMacro(ProjectionType, int, Equirectangular, Azimuthal);
78 void SetProjectionTypeToEquirectangular() { this->SetProjectionType(Equirectangular); }
79 void SetProjectionTypeToAzimuthal() { this->SetProjectionType(Azimuthal); }
81
83
89 vtkGetMacro(Angle, double);
90 vtkSetClampMacro(Angle, double, 90.0, 360.0);
92
94
99 vtkGetMacro(Interpolate, bool);
100 vtkSetMacro(Interpolate, bool);
101 vtkBooleanMacro(Interpolate, bool);
103
104protected:
106 ~vtkPanoramicProjectionPass() override = default;
107
108 void RenderOnFace(const vtkRenderState* s, int index);
109
111
113
117 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
118 vtkTextureObject* CubeMapTexture = nullptr;
119 vtkOpenGLQuadHelper* QuadHelper = nullptr;
120
121 unsigned int CubeResolution = 300;
122 int ProjectionType = Equirectangular;
123 double Angle = 180.0;
124 bool Interpolate = false;
125
126private:
128 void operator=(const vtkPanoramicProjectionPass&) = delete;
129};
130
131VTK_ABI_NAMESPACE_END
132#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition vtkIndent.h:29
Internal class which encapsulates OpenGL FramebufferObject.
Class to make rendering a full screen quad easier.
OpenGL rendering window.
Render pass that render the scene in a cubemap and project these six renderings to a single quad.
void InitOpenGLResources(vtkOpenGLRenderWindow *renWin)
void SetProjectionTypeToEquirectangular()
Get/Set the type of projection.
static vtkPanoramicProjectionPass * New()
void Project(vtkOpenGLRenderWindow *renWin)
~vtkPanoramicProjectionPass() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RenderOnFace(const vtkRenderState *s, int index)
void Render(const vtkRenderState *s) override
Perform rendering according to a render state.
vtkPanoramicProjectionPass()=default
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
void SetProjectionTypeToAzimuthal()
Get/Set the type of projection.
Context in which a vtkRenderPass will render.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition vtkWindow.h:25