VTK  9.6.20260613
vtkHexagonalBokehBlurPass.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2025 F3D-APP Foundation
3// SPDX-License-Identifier: BSD-3-Clause
14
15#ifndef vtkHexagonalBokehBlurPass_h
16#define vtkHexagonalBokehBlurPass_h
17
19#include "vtkOpenGLQuadHelper.h"
20#include "vtkSmartPointer.h"
21
23class vtkOpenGLFrameBuffer;
24
25VTK_ABI_NAMESPACE_BEGIN
26
27class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkHexagonalBokehBlurPass
29{
30public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
38 void Render(const vtkRenderState* s) override;
39
44
46
52 vtkGetMacro(CircleOfConfusionRadius, float);
53 vtkSetMacro(CircleOfConfusionRadius, float);
55
56protected:
58 ~vtkHexagonalBokehBlurPass() override = default;
59
60private:
62 void operator=(const vtkHexagonalBokehBlurPass&) = delete;
63
67 void InitializeGraphicsResources(vtkOpenGLRenderWindow* renderWindow, int width, int height);
68
72 void RenderDelegate(const vtkRenderState* s, int width, int height);
73
77 void RenderDirectionalBlur(vtkOpenGLRenderWindow* renWin, int width, int height, float coc);
78
82 void RenderRhomboidBlur(vtkOpenGLRenderWindow* renWin, int width, int height, float coc);
83
84 float CircleOfConfusionRadius = 20.0f;
85
87 vtkSmartPointer<vtkTextureObject> VerticalBlurTexture;
88 vtkSmartPointer<vtkTextureObject> DiagonalBlurTexture;
89 vtkSmartPointer<vtkTextureObject> BackgroundTexture;
90
91 std::unique_ptr<vtkOpenGLQuadHelper> BlurQuadHelper = nullptr;
92 std::unique_ptr<vtkOpenGLQuadHelper> RhomboidQuadHelper = nullptr;
93};
94
95VTK_ABI_NAMESPACE_END
96
97#endif // vtkHexagonalBokehBlurPass_h
void Render(const vtkRenderState *s) override
Entry point of the rendering execution for this render pass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHexagonalBokehBlurPass()=default
static vtkHexagonalBokehBlurPass * New()
void ReleaseGraphicsResources(vtkWindow *w) override
Release graphics resources held by the render pass.
~vtkHexagonalBokehBlurPass() override=default
vtkImageProcessingPass()
Default constructor.
void RenderDelegate(const vtkRenderState *s, int width, int height, int newWidth, int newHeight, vtkOpenGLFramebufferObject *fbo, vtkTextureObject *target)
Render delegate with a image of different dimensions than the original one.
a simple class to control print indentation
Definition vtkIndent.h:108
OpenGL rendering window.
Context in which a vtkRenderPass will render.
Hold a reference to a vtkObjectBase instance.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition vtkWindow.h:61
#define VTK_MARSHALAUTO