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 "vtkRenderingVolumeModule.h" // For export macro
29 #include "vtkDirectionEncoder.h"
30 
32 {
33 public:
35  void PrintSelf( ostream& os, vtkIndent indent );
36 
40 
41 
43  int GetEncodedDirection( float n[3] );
44 
46  float *GetDecodedGradient( int value );
47 
49  int GetNumberOfEncodedDirections( void ) { return 65536; }
50 
52 
56  float *GetDecodedGradientTable( void )
57  {
58  return &(this->DecodedGradientTable[0]);
59  }
61 
62 
63 protected:
66 
67  static float DecodedGradientTable[65536*3];
68 
70 
71  static void InitializeDecodedGradientTable();
74 
75 private:
77  void operator=(const vtkSphericalDirectionEncoder&); // Not implemented.
78 };
79 
80 
81 #endif
82 
83 
encode a direction into a one or two byte value
#define VTKRENDERINGVOLUME_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
A direction encoder based on spherical coordinates.
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual float * GetDecodedGradient(int value)=0
virtual int GetEncodedDirection(float n[3])=0
static vtkObject * New()