VTK
vtkSphericalDirectionEncoder.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSphericalDirectionEncoder.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 =========================================================================*/
25 #ifndef __vtkSphericalDirectionEncoder_h
26 #define __vtkSphericalDirectionEncoder_h
27 
28 #include "vtkDirectionEncoder.h"
29 
31 {
32 public:
34  void PrintSelf( ostream& os, vtkIndent indent );
35 
39 
40 
42  int GetEncodedDirection( float n[3] );
43 
45  float *GetDecodedGradient( int value );
46 
48  int GetNumberOfEncodedDirections( void ) { return 65536; }
49 
51 
55  float *GetDecodedGradientTable( void )
56  {
57  return &(this->DecodedGradientTable[0]);
58  }
60 
61 
62 protected:
65 
66  static float DecodedGradientTable[65536*3];
67 
69 
70  static void InitializeDecodedGradientTable();
73 
74 private:
76  void operator=(const vtkSphericalDirectionEncoder&); // Not implemented.
77 };
78 
79 
80 #endif
81 
82