VTK  9.3.0
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 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkFloatArray;
26 class vtkMatrix4x4;
30 class vtkRenderWindow;
32 class vtkVisibilitySort;
33 
34 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLProjectedTetrahedraMapper
36 {
37 public:
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 
62 protected:
65 
66  void Initialize(vtkRenderer* ren);
68  int CurrentFBOWidth, CurrentFBOHeight;
74 
77 
79 
80  float MaxCellSize;
83 
84  // The VBO and its layout.
86 
87  // Structures for the various cell types we render.
89 
90  int GaveError;
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 
111 
114 
115 private:
117  void operator=(const vtkOpenGLProjectedTetrahedraMapper&) = delete;
118 
119  class vtkInternals;
120  vtkInternals* Internals;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:31
a simple class to control print indentation
Definition: vtkIndent.h:29
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
Internal class which encapsulates OpenGL FramebufferObject.
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.
static vtkOpenGLProjectedTetrahedraMapper * New()
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
Definition: vtkRenderer.h:62
record modification and/or execution time
Definition: vtkTimeStamp.h:25
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:40
window superclass for vtkRenderWindow
Definition: vtkWindow.h:28
@ value
Definition: vtkX3D.h:220