VTK
vtkSimpleMotionBlurPass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSimpleMotionBlurPass.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 =========================================================================*/
32 #ifndef vtkSimpleMotionBlurPass_h
33 #define vtkSimpleMotionBlurPass_h
34 
35 #include "vtkRenderingOpenGL2Module.h" // For export macro
37 
39 class vtkOpenGLHelper;
41 class vtkTextureObject;
42 
43 class VTKRENDERINGOPENGL2_EXPORT vtkSimpleMotionBlurPass : public vtkDepthImageProcessingPass
44 {
45 public:
46  static vtkSimpleMotionBlurPass *New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
54  void Render(const vtkRenderState *s) override;
55 
61  void ReleaseGraphicsResources(vtkWindow *w) override;
62 
64 
72  vtkGetMacro(SubFrames, int);
73  virtual void SetSubFrames(int subFrames);
75 
80  vtkSetMacro(DepthFormat, int);
81 
88  vtkSetMacro(ColorFormat, int);
89 
90  // Get the depth texture object
91  vtkGetObjectMacro(DepthTexture, vtkTextureObject);
92 
93  // Get the Color texture object
94  vtkGetObjectMacro(ColorTexture, vtkTextureObject);
95 
96  protected:
101 
105  ~vtkSimpleMotionBlurPass() override;
106 
111  vtkTextureObject *ColorTexture; // render target for the scene
112  vtkTextureObject *AccumulationTexture[2]; // where we add the colors
113  vtkTextureObject *DepthTexture; // render target for the depth
114 
116 
124 
127 
128  int SubFrames; // number of sub frames
129  int CurrentSubFrame; // what one are we on
132 
133  private:
135  void operator=(const vtkSimpleMotionBlurPass&) = delete;
136 };
137 
138 #endif
vtkDepthImageProcessingPass
Convenient class for post-processing passes. Based on vtkImageProcessingPass, but writes depth as wel...
Definition: vtkDepthImageProcessingPass.h:62
vtkSimpleMotionBlurPass::ViewportY
int ViewportY
Definition: vtkSimpleMotionBlurPass.h:120
vtkSimpleMotionBlurPass::ColorTexture
vtkTextureObject * ColorTexture
Definition: vtkSimpleMotionBlurPass.h:111
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
vtkSimpleMotionBlurPass::ViewportHeight
int ViewportHeight
Definition: vtkSimpleMotionBlurPass.h:122
vtkImageProcessingPass::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources and ask components to release their own resources.
vtkSimpleMotionBlurPass::ViewportX
int ViewportX
Cache viewport values for depth peeling.
Definition: vtkSimpleMotionBlurPass.h:119
vtkSimpleMotionBlurPass::CurrentSubFrame
int CurrentSubFrame
Definition: vtkSimpleMotionBlurPass.h:129
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkSimpleMotionBlurPass::DepthFormat
int DepthFormat
Definition: vtkSimpleMotionBlurPass.h:125
vtkSimpleMotionBlurPass::FrameBufferObject
vtkOpenGLFramebufferObject * FrameBufferObject
Graphics resources.
Definition: vtkSimpleMotionBlurPass.h:110
vtkOpenGLHelper
Definition: vtkOpenGLHelper.h:30
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:44
vtkSimpleMotionBlurPass
Avergae frames to simulate motion blur.
Definition: vtkSimpleMotionBlurPass.h:43
vtkSimpleMotionBlurPass::ColorFormat
int ColorFormat
Definition: vtkSimpleMotionBlurPass.h:126
vtkSimpleMotionBlurPass::SubFrames
int SubFrames
Definition: vtkSimpleMotionBlurPass.h:128
vtkDepthImageProcessingPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSimpleMotionBlurPass::ViewportWidth
int ViewportWidth
Definition: vtkSimpleMotionBlurPass.h:121
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:53
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:40
vtkSimpleMotionBlurPass::DepthTexture
vtkTextureObject * DepthTexture
Definition: vtkSimpleMotionBlurPass.h:113
vtkSimpleMotionBlurPass::BlendProgram
vtkOpenGLHelper * BlendProgram
Definition: vtkSimpleMotionBlurPass.h:131
vtkSimpleMotionBlurPass::ActiveAccumulationTexture
int ActiveAccumulationTexture
Definition: vtkSimpleMotionBlurPass.h:130
vtkDepthImageProcessingPass.h