VTK  9.1.0
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
40#include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
41
42#include "vtkOpenGLHelper.h" // used for ivars
43
46class vtkFloatArray;
47class vtkRenderWindow;
51
52class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLProjectedTetrahedraMapper
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
60 void ReleaseGraphicsResources(vtkWindow* window) override;
61
62 void Render(vtkRenderer* renderer, vtkVolume* volume) override;
63
65
69 vtkSetMacro(UseFloatingPointFrameBuffer, bool);
70 vtkGetMacro(UseFloatingPointFrameBuffer, bool);
71 vtkBooleanMacro(UseFloatingPointFrameBuffer, bool);
73
78 bool IsSupported(vtkRenderWindow* context) override;
79
80protected:
83
86 int CurrentFBOWidth, CurrentFBOHeight;
92
95
97
101
102 // The VBO and its layout.
104
105 // Structures for the various cell types we render.
107
109
111
113
114 float* SqrtTable;
116
117 virtual void ProjectTetrahedra(
118 vtkRenderer* renderer, vtkVolume* volume, vtkOpenGLRenderWindow* window);
119
120 float GetCorrectedDepth(float x, float y, float z1, float z2,
121 const float inverse_projection_mat[16], int use_linear_depth_correction,
122 float linear_depth_correction);
123
128 void GLSafeUpdateProgress(double value, vtkOpenGLRenderWindow* window);
129
130private:
132 void operator=(const vtkOpenGLProjectedTetrahedraMapper&) = delete;
133
134 class vtkInternals;
135 vtkInternals* Internals;
136};
137
138#endif
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition: vtkIndent.h:113
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
Definition: vtkRenderer.h:182
record modification and/or execution time
Definition: vtkTimeStamp.h:52
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:144
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39