VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
VolumeRendering
vtkRecursiveSphereDirectionEncoder.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkRecursiveSphereDirectionEncoder.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
=========================================================================*/
15
28
#ifndef __vtkRecursiveSphereDirectionEncoder_h
29
#define __vtkRecursiveSphereDirectionEncoder_h
30
31
#include "
vtkDirectionEncoder.h
"
32
33
class
VTK_VOLUMERENDERING_EXPORT
vtkRecursiveSphereDirectionEncoder
:
public
vtkDirectionEncoder
34
{
35
public
:
36
vtkTypeMacro(
vtkRecursiveSphereDirectionEncoder
,
vtkDirectionEncoder
);
37
void
PrintSelf
( ostream& os,
vtkIndent
indent );
38
41
static
vtkRecursiveSphereDirectionEncoder
*
New
();
42
43
45
int
GetEncodedDirection
(
float
n[3] );
46
48
float
*
GetDecodedGradient
(
int
value
);
49
51
int
GetNumberOfEncodedDirections
(
void
);
52
57
float
*
GetDecodedGradientTable
(
void
);
58
60
72
vtkSetClampMacro( RecursionDepth,
int
, 0, 6 );
73
vtkGetMacro( RecursionDepth,
int
);
75
76
protected
:
77
vtkRecursiveSphereDirectionEncoder
();
78
~
vtkRecursiveSphereDirectionEncoder
();
79
80
// How far to recursively divide the sphere
81
int
RecursionDepth
;
82
83
// The index table which maps (x,y) position in the rotated grid
84
// to an encoded normal
85
//int IndexTable[2*NORM_SQR_SIZE - 1][2*NORM_SQR_SIZE -1];
86
int
*
IndexTable
;
87
88
// This is a table that maps encoded normal (2 byte value) to a
89
// normal (dx, dy, dz)
90
//float DecodedNormal[3*(1 + 2*(NORM_SQR_SIZE*NORM_SQR_SIZE+
91
// (NORM_SQR_SIZE-1)*(NORM_SQR_SIZE-1)))];
92
float
*
DecodedNormal
;
93
94
// Method to initialize the index table and variable that
95
// stored the recursion depth the last time the table was
96
// built
97
void
InitializeIndexTable(
void
);
98
int
IndexTableRecursionDepth
;
99
100
int
OuterSize
;
101
int
InnerSize
;
102
int
GridSize
;
103
private
:
104
vtkRecursiveSphereDirectionEncoder
(
const
vtkRecursiveSphereDirectionEncoder
&);
// Not implemented.
105
void
operator=(
const
vtkRecursiveSphereDirectionEncoder
&);
// Not implemented.
106
};
107
108
109
#endif
110
Generated on Fri Aug 2 2013 12:20:03 for VTK by
1.8.4