VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
VolumeOpenGL
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
35
#include "
vtkProjectedAAHexahedraMapper.h
"
36
37
class
vtkFloatArray
;
38
class
vtkPoints
;
39
class
vtkUnsignedCharArray
;
40
class
vtkVisibilitySort
;
41
class
vtkVolumeProperty
;
42
class
vtkRenderWindow
;
43
class
vtkShaderProgram2
;
44
45
class
VTKRENDERINGVOLUMEOPENGL_EXPORT
vtkOpenGLProjectedAAHexahedraMapper
46
:
public
vtkProjectedAAHexahedraMapper
47
{
48
public
:
49
vtkTypeMacro(
vtkOpenGLProjectedAAHexahedraMapper
,
50
vtkProjectedAAHexahedraMapper
);
51
static
vtkOpenGLProjectedAAHexahedraMapper
*
New
();
52
virtual
void
PrintSelf
(ostream &os,
vtkIndent
indent);
53
56
bool
IsRenderSupported
(
vtkRenderWindow
*w);
57
58
void
Render
(
vtkRenderer
*renderer,
vtkVolume
*volume);
59
60
void
ReleaseGraphicsResources
(
vtkWindow
*window);
61
62
protected
:
63
vtkOpenGLProjectedAAHexahedraMapper
();
64
~
vtkOpenGLProjectedAAHexahedraMapper
();
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
96
bool
Initialized
;
97
98
int
UsingCellColors
;
99
100
float
MaxCellSize
;
101
vtkTimeStamp
InputAnalyzedTime
;
102
vtkTimeStamp
PreintTextureTime
;
103
vtkTimeStamp
ColorsMappedTime
;
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
114
int
num_points
;
115
static
const
int
max_points = 4096;
116
117
// our shader
118
vtkShaderProgram2
*
Shader
;
119
120
int
GaveError
;
121
122
float
ScalarScale,
ScalarShift
, ScalarResolution;
123
float
LengthScale
;
124
125
vtkVolumeProperty
*
LastProperty
;
126
127
vtkFloatArray
*
ConvertedPoints
;
128
vtkFloatArray
*
ConvertedScalars
;
129
130
private
:
131
vtkOpenGLProjectedAAHexahedraMapper
(
const
vtkOpenGLProjectedAAHexahedraMapper
&);
// Not Implemented.
132
void
operator=(
const
vtkOpenGLProjectedAAHexahedraMapper
&);
// Not Implemented.
133
};
134
135
#endif
Generated on Thu May 24 2012 22:22:37 for VTK by
1.8.1