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 
35 
36 class vtkFloatArray;
37 class vtkPoints;
39 class vtkVisibilitySort;
40 class vtkVolumeProperty;
41 class vtkRenderWindow;
42 class vtkShaderProgram2;
43 
45 {
46 public:
50  virtual void PrintSelf(ostream &os, vtkIndent indent);
51 
55 
56  void Render(vtkRenderer *renderer, vtkVolume *volume);
57 
58  void ReleaseGraphicsResources(vtkWindow *window);
59 
60 protected:
63 
65  float* ConvertScalars(vtkDataArray* inScalars);
66 
68  float* ConvertPoints(vtkPoints* inPoints);
69 
71  virtual void ProjectHexahedra(vtkRenderer *renderer, vtkVolume *volume);
72 
74  void Initialize(vtkRenderer *renderer, vtkVolume *volume);
75 
78  void UpdatePreintegrationTexture(vtkVolume *vome, vtkDataArray *scalars);
79 
82  void CreateProgram(vtkRenderWindow *w);
83 
85  void SetState(double* observer);
86 
88  void RenderHexahedron(float min[3], float max[3], float scalars[8]);
89 
91  void UnsetState();
92 
93 
95 
97 
98  float MaxCellSize;
102 
103  unsigned int PreintTexture;
104 
105  // OpenGL arrays for primitive submission
106  float* pos_points;
107  float* min_points;
108  float* node_data1;
109  float* node_data2;
110 
111  // number of pending points
113  static const int max_points = 4096;
114 
115  // our shader
117 
119 
120  float ScalarScale, ScalarShift, ScalarResolution;
121  float LengthScale;
122 
124 
127 
128 private:
130  void operator=(const vtkOpenGLProjectedAAHexahedraMapper &); // Not Implemented.
131 };
132 
133 #endif