VTK
dox
Rendering
OpenGL2
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
33
#include "
vtkImageProcessingPass.h
"
34
#include "vtkRenderingOpenGL2Module.h"
// For export macro
35
36
class
vtkOpenGLFramebufferObject
;
37
class
vtkOpenGLQuadHelper
;
38
class
vtkTextureObject
;
39
40
class
VTKRENDERINGOPENGL2_EXPORT
vtkPanoramicProjectionPass
:
public
vtkImageProcessingPass
41
{
42
public
:
43
static
vtkPanoramicProjectionPass
*
New
();
44
vtkTypeMacro(
vtkPanoramicProjectionPass
,
vtkImageProcessingPass
);
45
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
46
50
void
Render
(
const
vtkRenderState
* s)
override
;
51
55
void
ReleaseGraphicsResources
(
vtkWindow
* w)
override
;
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
101
protected
:
102
vtkPanoramicProjectionPass
() =
default
;
103
~
vtkPanoramicProjectionPass
()
override
=
default
;
104
105
void
RenderOnFace(
const
vtkRenderState
* s,
int
index
);
106
107
void
Project(
vtkOpenGLRenderWindow
* renWin);
108
109
void
InitOpenGLResources(
vtkOpenGLRenderWindow
* renWin);
110
114
vtkOpenGLFramebufferObject
* FrameBufferObject =
nullptr
;
115
vtkTextureObject
* CubeMapTexture =
nullptr
;
116
vtkOpenGLQuadHelper
* QuadHelper =
nullptr
;
117
118
unsigned
int
CubeResolution = 300;
119
int
ProjectionType = Equirectangular;
120
double
Angle = 180.0;
121
122
private
:
123
vtkPanoramicProjectionPass
(
const
vtkPanoramicProjectionPass
&) =
delete
;
124
void
operator=(
const
vtkPanoramicProjectionPass
&) =
delete
;
125
};
126
127
#endif
vtkImageProcessingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPanoramicProjectionPass::SetProjectionTypeToAzimuthal
void SetProjectionTypeToAzimuthal()
Definition:
vtkPanoramicProjectionPass.h:87
vtkImageProcessingPass.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkRenderPass::Render
virtual void Render(const vtkRenderState *s)=0
Perform rendering according to a render state s.
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition:
vtkOpenGLFramebufferObject.h:182
vtkOpenGLQuadHelper
Class to make rendering a full screen quad easier.
Definition:
vtkOpenGLQuadHelper.h:54
vtkImageProcessingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkPanoramicProjectionPass::SetProjectionTypeToEquirectangular
void SetProjectionTypeToEquirectangular()
Definition:
vtkPanoramicProjectionPass.h:86
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:37
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:44
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition:
vtkOpenGLRenderWindow.h:53
vtkRenderState
Context in which a vtkRenderPass will render.
Definition:
vtkRenderState.h:40
vtkX3D::index
Definition:
vtkX3D.h:246
vtkPanoramicProjectionPass
Render pass that render the scene in a cubemap and project these six renderings to a single quad....
Definition:
vtkPanoramicProjectionPass.h:40
vtkImageProcessingPass
Convenient class for post-processing passes. render pass.
Definition:
vtkImageProcessingPass.h:38
Generated by
1.8.16