VTK  9.2.6
vtkOpenGLProjectedTetrahedraMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLProjectedTetrahedraMapper.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 =========================================================================*/
15 
16 /*
17  * Copyright 2003 Sandia Corporation.
18  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
19  * license for use of this work by or on behalf of the
20  * U.S. Government. Redistribution and use in source and binary forms, with
21  * or without modification, are permitted provided that this Notice and any
22  * statement of authorship are reproduced on all copies.
23  */
24 
36 #ifndef vtkOpenGLProjectedTetrahedraMapper_h
37 #define vtkOpenGLProjectedTetrahedraMapper_h
38 
39 #include "vtkNew.h" // for ivars
40 #include "vtkOpenGLHelper.h" // used for ivars
42 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
43 
44 class vtkFloatArray;
45 class vtkMatrix4x4;
49 class vtkRenderWindow;
51 class vtkVisibilitySort;
52 
53 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLProjectedTetrahedraMapper
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  void ReleaseGraphicsResources(vtkWindow* window) override;
62 
63  void Render(vtkRenderer* renderer, vtkVolume* volume) override;
64 
66 
70  vtkSetMacro(UseFloatingPointFrameBuffer, bool);
71  vtkGetMacro(UseFloatingPointFrameBuffer, bool);
72  vtkBooleanMacro(UseFloatingPointFrameBuffer, bool);
74 
79  bool IsSupported(vtkRenderWindow* context) override;
80 
81 protected:
84 
85  void Initialize(vtkRenderer* ren);
87  int CurrentFBOWidth, CurrentFBOHeight;
88  bool AllocateFOResources(vtkRenderer* ren);
93 
96 
98 
99  float MaxCellSize;
102 
103  // The VBO and its layout.
105 
106  // Structures for the various cell types we render.
108 
110 
112 
114 
115  float* SqrtTable;
117 
118  virtual void ProjectTetrahedra(
119  vtkRenderer* renderer, vtkVolume* volume, vtkOpenGLRenderWindow* window);
120 
121  float GetCorrectedDepth(float x, float y, float z1, float z2,
122  const float inverse_projection_mat[16], int use_linear_depth_correction,
123  float linear_depth_correction);
124 
129  void GLSafeUpdateProgress(double value, vtkOpenGLRenderWindow* window);
130 
133 
134 private:
136  void operator=(const vtkOpenGLProjectedTetrahedraMapper&) = delete;
137 
138  class vtkInternals;
139  vtkInternals* Internals;
140 };
141 
142 #endif
OpenGL rendering window.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
Abstract class that can sort cell data along a viewpoint.
virtual bool IsSupported(vtkRenderWindow *)
Return true if the rendering context provides the nececessary functionality to use this class...
record modification and/or execution time
Definition: vtkTimeStamp.h:35
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
abstract specification for renderers
Definition: vtkRenderer.h:72
void Render(vtkRenderer *ren, vtkVolume *vol) override=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
a simple class to control print indentation
Definition: vtkIndent.h:39
Unstructured grid volume renderer.
Internal class which encapsulates OpenGL FramebufferObject.
represents the common properties for rendering a volume.
dynamic, self-adjusting array of unsigned char
static vtkProjectedTetrahedraMapper * New()
create a window for renderers to draw into