VTK  9.1.0
vtkPanoramicProjectionPass.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPanoramicProjectionPass.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=========================================================================*/
30#ifndef vtkPanoramicProjectionPass_h
31#define vtkPanoramicProjectionPass_h
32
34#include "vtkRenderingOpenGL2Module.h" // For export macro
35
39
40class VTKRENDERINGOPENGL2_EXPORT vtkPanoramicProjectionPass : public vtkImageProcessingPass
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
50 void Render(const vtkRenderState* s) override;
51
56
58
62 vtkGetMacro(CubeResolution, unsigned int);
63 vtkSetMacro(CubeResolution, unsigned int);
65
69 enum : int
70 {
71 Equirectangular = 1,
72 Azimuthal = 2
73 };
74
76
84 vtkGetMacro(ProjectionType, int);
85 vtkSetClampMacro(ProjectionType, int, Equirectangular, Azimuthal);
86 void SetProjectionTypeToEquirectangular() { this->SetProjectionType(Equirectangular); }
87 void SetProjectionTypeToAzimuthal() { this->SetProjectionType(Azimuthal); }
89
91
97 vtkGetMacro(Angle, double);
98 vtkSetClampMacro(Angle, double, 90.0, 360.0);
100
102
107 vtkGetMacro(Interpolate, bool);
108 vtkSetMacro(Interpolate, bool);
109 vtkBooleanMacro(Interpolate, bool);
111
112protected:
114 ~vtkPanoramicProjectionPass() override = default;
115
116 void RenderOnFace(const vtkRenderState* s, int index);
117
119
121
125 vtkOpenGLFramebufferObject* FrameBufferObject = nullptr;
126 vtkTextureObject* CubeMapTexture = nullptr;
127 vtkOpenGLQuadHelper* QuadHelper = nullptr;
128
129 unsigned int CubeResolution = 300;
130 int ProjectionType = Equirectangular;
131 double Angle = 180.0;
132 bool Interpolate = false;
133
134private:
136 void operator=(const vtkPanoramicProjectionPass&) = delete;
137};
138
139#endif
Convenient class for post-processing passes.
a simple class to control print indentation
Definition: vtkIndent.h:113
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:39