VTK
vtkOpenGLProjectedAAHexahedraMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLProjectedAAHexahedraMapper.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 =========================================================================*/
31 #ifndef vtkOpenGLProjectedAAHexahedraMapper_h
32 #define vtkOpenGLProjectedAAHexahedraMapper_h
33 
34 #include "vtkRenderingVolumeOpenGLModule.h" // For export macro
36 
37 class vtkFloatArray;
38 class vtkPoints;
40 class vtkVisibilitySort;
41 class vtkVolumeProperty;
42 class vtkRenderWindow;
43 class vtkShaderProgram2;
44 
47 {
48 public:
52  virtual void PrintSelf(ostream &os, vtkIndent indent);
53 
57 
58  void Render(vtkRenderer *renderer, vtkVolume *volume);
59 
61 
62 protected:
65 
67  float* ConvertScalars(vtkDataArray* inScalars);
68 
70  float* ConvertPoints(vtkPoints* inPoints);
71 
73  virtual void ProjectHexahedra(vtkRenderer *renderer, vtkVolume *volume);
74 
76  void Initialize(vtkRenderer *renderer, vtkVolume *volume);
77 
81 
85 
87  void SetState(double* observer);
88 
90  void RenderHexahedron(float min[3], float max[3], float scalars[8]);
91 
93  void UnsetState();
94 
95 
97 
99 
100  float MaxCellSize;
104 
105  unsigned int PreintTexture;
106 
107  // OpenGL arrays for primitive submission
108  float* pos_points;
109  float* min_points;
110  float* node_data1;
111  float* node_data2;
112 
113  // number of pending points
115  static const int max_points = 4096;
116 
117  // our shader
119 
121 
122  float ScalarScale, ScalarShift, ScalarResolution;
123  float LengthScale;
124 
126 
129 
130 private:
132  void operator=(const vtkOpenGLProjectedAAHexahedraMapper &); // Not Implemented.
133 };
134 
135 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkOpenGLProjectedAAHexahedraMapper::~vtkOpenGLProjectedAAHexahedraMapper
~vtkOpenGLProjectedAAHexahedraMapper()
vtkOpenGLProjectedAAHexahedraMapper::num_points
int num_points
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:114
vtkOpenGLProjectedAAHexahedraMapper::ConvertedScalars
vtkFloatArray * ConvertedScalars
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:128
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
vtkOpenGLProjectedAAHexahedraMapper::UsingCellColors
int UsingCellColors
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:98
vtkOpenGLProjectedAAHexahedraMapper::RenderHexahedron
void RenderHexahedron(float min[3], float max[3], float scalars[8])
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:49
vtkOpenGLProjectedAAHexahedraMapper::Shader
vtkShaderProgram2 * Shader
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:118
vtkOpenGLProjectedAAHexahedraMapper::LastProperty
vtkVolumeProperty * LastProperty
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:125
vtkOpenGLProjectedAAHexahedraMapper::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkOpenGLProjectedAAHexahedraMapper::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *window)
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkOpenGLProjectedAAHexahedraMapper
OpenGL implementation of a volume mapper for axis-aligned hexahedra.
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:47
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:49
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkOpenGLProjectedAAHexahedraMapper::LengthScale
float LengthScale
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:123
vtkOpenGLProjectedAAHexahedraMapper::ConvertScalars
float * ConvertScalars(vtkDataArray *inScalars)
vtkOpenGLProjectedAAHexahedraMapper::Render
void Render(vtkRenderer *renderer, vtkVolume *volume)
vtkOpenGLProjectedAAHexahedraMapper::PreintTexture
unsigned int PreintTexture
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:105
vtkProjectedAAHexahedraMapper.h
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkOpenGLProjectedAAHexahedraMapper::Initialized
bool Initialized
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:96
vtkOpenGLProjectedAAHexahedraMapper::CreateProgram
void CreateProgram(vtkRenderWindow *w)
vtkOpenGLProjectedAAHexahedraMapper::vtkOpenGLProjectedAAHexahedraMapper
vtkOpenGLProjectedAAHexahedraMapper()
vtkOpenGLProjectedAAHexahedraMapper::ConvertPoints
float * ConvertPoints(vtkPoints *inPoints)
vtkOpenGLProjectedAAHexahedraMapper::MaxCellSize
float MaxCellSize
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:100
vtkOpenGLProjectedAAHexahedraMapper::SetState
void SetState(double *observer)
vtkOpenGLProjectedAAHexahedraMapper::ColorsMappedTime
vtkTimeStamp ColorsMappedTime
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:103
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:30
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkOpenGLProjectedAAHexahedraMapper::Initialize
void Initialize(vtkRenderer *renderer, vtkVolume *volume)
VTKRENDERINGVOLUMEOPENGL_EXPORT
#define VTKRENDERINGVOLUMEOPENGL_EXPORT
Definition: vtkRenderingVolumeOpenGLModule.h:15
vtkOpenGLProjectedAAHexahedraMapper::UpdatePreintegrationTexture
void UpdatePreintegrationTexture(vtkVolume *vome, vtkDataArray *scalars)
vtkOpenGLProjectedAAHexahedraMapper::node_data2
float * node_data2
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:111
vtkOpenGLProjectedAAHexahedraMapper::New
static vtkOpenGLProjectedAAHexahedraMapper * New()
vtkOpenGLProjectedAAHexahedraMapper::GaveError
int GaveError
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:120
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkOpenGLProjectedAAHexahedraMapper::ProjectHexahedra
virtual void ProjectHexahedra(vtkRenderer *renderer, vtkVolume *volume)
vtkProjectedAAHexahedraMapper
volume mapper for axis-aligned hexahedra
Definition: vtkProjectedAAHexahedraMapper.h:48
vtkOpenGLProjectedAAHexahedraMapper::ScalarShift
float ScalarShift
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:122
vtkVisibilitySort
Abstract class that can sort cell data along a viewpoint.
Definition: vtkVisibilitySort.h:57
vtkOpenGLProjectedAAHexahedraMapper::IsRenderSupported
bool IsRenderSupported(vtkRenderWindow *w)
vtkOpenGLProjectedAAHexahedraMapper::UnsetState
void UnsetState()
vtkShaderProgram2
GLSL Program.
Definition: vtkShaderProgram2.h:68
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkOpenGLProjectedAAHexahedraMapper::ConvertedPoints
vtkFloatArray * ConvertedPoints
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:127
vtkOpenGLProjectedAAHexahedraMapper::InputAnalyzedTime
vtkTimeStamp InputAnalyzedTime
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:101
vtkOpenGLProjectedAAHexahedraMapper::min_points
float * min_points
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:109
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:89
vtkgl::w
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
vtkOpenGLProjectedAAHexahedraMapper::pos_points
float * pos_points
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:108
vtkOpenGLProjectedAAHexahedraMapper::node_data1
float * node_data1
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:110
vtkRenderingVolumeOpenGLModule.h
vtkVolumeProperty
represents the common properties for rendering a volume.
Definition: vtkVolumeProperty.h:60
vtkOpenGLProjectedAAHexahedraMapper::PreintTextureTime
vtkTimeStamp PreintTextureTime
Definition: vtkOpenGLProjectedAAHexahedraMapper.h:102