VTK  9.5.20250715
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24
25VTK_ABI_NAMESPACE_BEGIN
26class vtkFloatArray;
27class vtkMatrix4x4;
31class vtkRenderWindow;
34
35class VTKRENDERINGVOLUMEOPENGL2_EXPORT VTK_MARSHALAUTO vtkOpenGLProjectedTetrahedraMapper
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 void ReleaseGraphicsResources(vtkWindow* window) override;
44
45 void Render(vtkRenderer* renderer, vtkVolume* volume) override;
46
48
52 vtkSetMacro(UseFloatingPointFrameBuffer, bool);
53 vtkGetMacro(UseFloatingPointFrameBuffer, bool);
54 vtkBooleanMacro(UseFloatingPointFrameBuffer, bool);
56
61 bool IsSupported(vtkRenderWindow* context) override;
62
63protected:
66
69 int CurrentFBOWidth, CurrentFBOHeight;
75
78
80
84
85 // The VBO and its layout.
87
88 // Structures for the various cell types we render.
90
92
94
96
97 float* SqrtTable;
99
100 virtual void ProjectTetrahedra(
101 vtkRenderer* renderer, vtkVolume* volume, vtkOpenGLRenderWindow* window);
102
103 float GetCorrectedDepth(float x, float y, float z1, float z2,
104 const float inverse_projection_mat[16], int use_linear_depth_correction,
105 float linear_depth_correction);
106
111 void GLSafeUpdateProgress(double value, vtkOpenGLRenderWindow* window);
112
115
116private:
118 void operator=(const vtkOpenGLProjectedTetrahedraMapper&) = delete;
119
120 class vtkInternals;
121 vtkInternals* Internals;
122};
123
124VTK_ABI_NAMESPACE_END
125#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:167
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:130
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHALAUTO