VTK  9.4.20241214
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
27
28VTK_ABI_NAMESPACE_BEGIN
32
33class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkPanoramicProjectionPass
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
44 void Render(const vtkRenderState* s) override;
45
50
52
56 vtkGetMacro(CubeResolution, unsigned int);
57 vtkSetMacro(CubeResolution, unsigned int);
59
63 enum : int
64 {
65 Equirectangular = 1,
66 Azimuthal = 2
67 };
68
70
78 vtkGetMacro(ProjectionType, int);
79 vtkSetClampMacro(ProjectionType, int, Equirectangular, Azimuthal);
80 void SetProjectionTypeToEquirectangular() { this->SetProjectionType(Equirectangular); }
81 void SetProjectionTypeToAzimuthal() { this->SetProjectionType(Azimuthal); }
83
85
91 vtkGetMacro(Angle, double);
92 vtkSetClampMacro(Angle, double, 90.0, 360.0);
94
96
101 vtkGetMacro(Interpolate, bool);
102 vtkSetMacro(Interpolate, bool);
103 vtkBooleanMacro(Interpolate, bool);
105
106protected:
108 ~vtkPanoramicProjectionPass() override = default;
109
110 void RenderOnFace(const vtkRenderState* s, int index);
111
113
115
119 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
120 vtkTextureObject* CubeMapTexture = nullptr;
121 vtkOpenGLQuadHelper* QuadHelper = nullptr;
122
123 unsigned int CubeResolution = 300;
124 int ProjectionType = Equirectangular;
125 double Angle = 180.0;
126 bool Interpolate = false;
127
128private:
130 void operator=(const vtkPanoramicProjectionPass&) = delete;
131};
132
133VTK_ABI_NAMESPACE_END
134#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition vtkIndent.h:108
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:48
#define VTK_MARSHALAUTO