VTK  9.3.20240420
vtkOpenGLProjectedTetrahedraMapper.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2003 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
16#ifndef vtkOpenGLProjectedTetrahedraMapper_h
17#define vtkOpenGLProjectedTetrahedraMapper_h
18
19#include "vtkNew.h" // for ivars
20#include "vtkOpenGLHelper.h" // used for ivars
22#include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkFloatArray;
26class vtkMatrix4x4;
30class vtkRenderWindow;
33
34class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLProjectedTetrahedraMapper
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
42 void ReleaseGraphicsResources(vtkWindow* window) override;
43
44 void Render(vtkRenderer* renderer, vtkVolume* volume) override;
45
47
51 vtkSetMacro(UseFloatingPointFrameBuffer, bool);
52 vtkGetMacro(UseFloatingPointFrameBuffer, bool);
53 vtkBooleanMacro(UseFloatingPointFrameBuffer, bool);
55
60 bool IsSupported(vtkRenderWindow* context) override;
61
62protected:
65
68 int CurrentFBOWidth, CurrentFBOHeight;
74
77
79
83
84 // The VBO and its layout.
86
87 // Structures for the various cell types we render.
89
91
93
95
96 float* SqrtTable;
98
99 virtual void ProjectTetrahedra(
100 vtkRenderer* renderer, vtkVolume* volume, vtkOpenGLRenderWindow* window);
101
102 float GetCorrectedDepth(float x, float y, float z1, float z2,
103 const float inverse_projection_mat[16], int use_linear_depth_correction,
104 float linear_depth_correction);
105
110 void GLSafeUpdateProgress(double value, vtkOpenGLRenderWindow* window);
111
114
115private:
117 void operator=(const vtkOpenGLProjectedTetrahedraMapper&) = delete;
118
119 class vtkInternals;
120 vtkInternals* Internals;
121};
122
123VTK_ABI_NAMESPACE_END
124#endif
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
Allocate and hold a VTK object.
Definition vtkNew.h:160
Internal class which encapsulates OpenGL FramebufferObject.
static vtkOpenGLProjectedTetrahedraMapper * New()
void GLSafeUpdateProgress(double value, vtkOpenGLRenderWindow *window)
Update progress ensuring that OpenGL state is saved and restored before invoking progress.
void ReleaseGraphicsResources(vtkWindow *window) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
float GetCorrectedDepth(float x, float y, float z1, float z2, const float inverse_projection_mat[16], int use_linear_depth_correction, float linear_depth_correction)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool AllocateFOResources(vtkRenderer *ren)
virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume, vtkOpenGLRenderWindow *window)
void Render(vtkRenderer *renderer, vtkVolume *volume) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
bool IsSupported(vtkRenderWindow *context) override
Return true if the rendering context provides the nececessary functionality to use this class.
void Initialize(vtkRenderer *ren)
OpenGL rendering window.
Unstructured grid volume renderer.
create a window for renderers to draw into
abstract specification for renderers
record modification and/or execution time
dynamic, self-adjusting array of unsigned char
Abstract class that can sort cell data along a viewpoint.
represents the common properties for rendering a volume.
represents a volume (data & properties) in a rendered scene
Definition vtkVolume.h:120
window superclass for vtkRenderWindow
Definition vtkWindow.h:48