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 
60  void ReleaseGraphicsResources(vtkWindow *window);
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 
80  void UpdatePreintegrationTexture(vtkVolume *vome, vtkDataArray *scalars);
81 
84  void CreateProgram(vtkRenderWindow *w);
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
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
#define VTKRENDERINGVOLUMEOPENGL_EXPORT
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:34
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
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:36
GLSL Program.
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void PrintSelf(ostream &os, vtkIndent indent)
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
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