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 =========================================================================*/
32 #ifndef vtkOpenGLProjectedAAHexahedraMapper_h
33 #define vtkOpenGLProjectedAAHexahedraMapper_h
34 
35 #include "vtkRenderingVolumeOpenGLModule.h" // For export macro
37 
38 class vtkFloatArray;
39 class vtkPoints;
41 class vtkVisibilitySort;
42 class vtkVolumeProperty;
43 class vtkRenderWindow;
44 class vtkShaderProgram2;
45 
46 class VTKRENDERINGVOLUMEOPENGL_EXPORT vtkOpenGLProjectedAAHexahedraMapper
48 {
49 public:
53  virtual void PrintSelf(ostream &os, vtkIndent indent);
54 
60 
61  void Render(vtkRenderer *renderer, vtkVolume *volume);
62 
63  void ReleaseGraphicsResources(vtkWindow *window);
64 
65 protected:
68 
72  float* ConvertScalars(vtkDataArray* inScalars);
73 
77  float* ConvertPoints(vtkPoints* inPoints);
78 
83  virtual void ProjectHexahedra(vtkRenderer *renderer, vtkVolume *volume);
84 
88  void Initialize(vtkRenderer *renderer, vtkVolume *volume);
89 
94  void UpdatePreintegrationTexture(vtkVolume *vome, vtkDataArray *scalars);
95 
100  void CreateProgram(vtkRenderWindow *w);
101 
105  void SetState(double* observer);
106 
110  void RenderHexahedron(float min[3], float max[3], float scalars[8]);
111 
115  void UnsetState();
116 
117 
119 
121 
122  float MaxCellSize;
126 
127  unsigned int PreintTexture;
128 
129  // OpenGL arrays for primitive submission
130  float* pos_points;
131  float* min_points;
132  float* node_data1;
133  float* node_data2;
134 
135  // number of pending points
137  static const int max_points = 4096;
138 
139  // our shader
141 
143 
144  float ScalarScale, ScalarShift, ScalarResolution;
145  float LengthScale;
146 
148 
151 
152 private:
154  void operator=(const vtkOpenGLProjectedAAHexahedraMapper &) VTK_DELETE_FUNCTION;
155 };
156 
157 #endif
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Abstract class that can sort cell data along a viewpoint.
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:63
OpenGL implementation of a volume mapper for axis-aligned hexahedra.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
GLSL Program.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
volume mapper for axis-aligned hexahedra
static vtkProjectedAAHexahedraMapper * New()
represents the common properties for rendering a volume.
virtual bool IsRenderSupported(vtkRenderWindow *w)=0
Check if the required OpenGL extensions are supported by the OpenGL context attached to the render wi...
dynamic, self-adjusting array of unsigned char
create a window for renderers to draw into
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
#define max(a, b)
represent and manipulate 3D points
Definition: vtkPoints.h:39