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
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:48
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
Abstract class that can sort cell data along a viewpoint.
record modification and/or execution time
Definition: vtkTimeStamp.h:33
#define VTK_VOLUMERENDERING_EXPORT
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
abstract specification for renderers
Definition: vtkRenderer.h:69
OpenGL implementation of a volume mapper for axis-aligned hexahedra.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
GLSL Program.
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void PrintSelf(ostream &os, vtkIndent indent)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
volume mapper for axis-aligned hexahedra
static vtkProjectedAAHexahedraMapper * New()
represents the common properties for rendering a volume.
virtual bool IsRenderSupported(vtkRenderWindow *w)=0
dynamic, self-adjusting array of unsigned char
create a window for renderers to draw into
virtual void ReleaseGraphicsResources(vtkWindow *)
#define max(a, b)
represent and manipulate 3D points
Definition: vtkPoints.h:38