VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
Volume
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 "vtkRenderingVolumeModule.h"
// For export macro
32
#include "
vtkDirectionEncoder.h
"
33
34
class
VTKRENDERINGVOLUME_EXPORT
vtkRecursiveSphereDirectionEncoder
:
public
vtkDirectionEncoder
35
{
36
public
:
37
vtkTypeMacro(
vtkRecursiveSphereDirectionEncoder
,
vtkDirectionEncoder
);
38
void
PrintSelf
( ostream& os,
vtkIndent
indent );
39
42
static
vtkRecursiveSphereDirectionEncoder
*
New
();
43
44
46
int
GetEncodedDirection
(
float
n[3] );
47
49
float
*
GetDecodedGradient
(
int
value
);
50
52
int
GetNumberOfEncodedDirections
(
void
);
53
58
float
*
GetDecodedGradientTable
(
void
);
59
61
73
vtkSetClampMacro( RecursionDepth,
int
, 0, 6 );
74
vtkGetMacro( RecursionDepth,
int
);
76
77
protected
:
78
vtkRecursiveSphereDirectionEncoder
();
79
~
vtkRecursiveSphereDirectionEncoder
();
80
81
// How far to recursively divide the sphere
82
int
RecursionDepth
;
83
84
// The index table which maps (x,y) position in the rotated grid
85
// to an encoded normal
86
//int IndexTable[2*NORM_SQR_SIZE - 1][2*NORM_SQR_SIZE -1];
87
int
*
IndexTable
;
88
89
// This is a table that maps encoded normal (2 byte value) to a
90
// normal (dx, dy, dz)
91
//float DecodedNormal[3*(1 + 2*(NORM_SQR_SIZE*NORM_SQR_SIZE+
92
// (NORM_SQR_SIZE-1)*(NORM_SQR_SIZE-1)))];
93
float
*
DecodedNormal
;
94
95
// Method to initialize the index table and variable that
96
// stored the recursion depth the last time the table was
97
// built
98
void
InitializeIndexTable(
void
);
99
int
IndexTableRecursionDepth
;
100
101
int
OuterSize
;
102
int
InnerSize
;
103
int
GridSize
;
104
private
:
105
vtkRecursiveSphereDirectionEncoder
(
const
vtkRecursiveSphereDirectionEncoder
&);
// Not implemented.
106
void
operator=(
const
vtkRecursiveSphereDirectionEncoder
&);
// Not implemented.
107
};
108
109
110
#endif
111
Generated on Thu May 24 2012 22:22:37 for VTK by
1.8.1