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=========================================================================*/
26#ifndef vtkSphericalDirectionEncoder_h
27#define vtkSphericalDirectionEncoder_h
28
29#include "vtkRenderingVolumeModule.h" // For export macro
30#include "vtkDirectionEncoder.h"
31
32class VTKRENDERINGVOLUME_EXPORT vtkSphericalDirectionEncoder : public vtkDirectionEncoder
33{
34public:
36 void PrintSelf( ostream& os, vtkIndent indent );
37
44
45
49 int GetEncodedDirection( float n[3] );
50
55
59 int GetNumberOfEncodedDirections( void ) { return 65536; }
60
68 {
69 return &(this->DecodedGradientTable[0]);
70 }
71
72
73protected:
76
77 static float DecodedGradientTable[65536*3];
78
80
86
87private:
89 void operator=(const vtkSphericalDirectionEncoder&) VTK_DELETE_FUNCTION;
90};
91
92
93#endif
94
95
encode a direction into a one or two byte value
a simple class to control print indentation
Definition: vtkIndent.h:40
A direction encoder based on spherical coordinates.
int GetNumberOfEncodedDirections(void)
Return the number of encoded directions.
float * GetDecodedGradientTable(void)
Get the decoded gradient table.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static void InitializeDecodedGradientTable()
Initialize the table at startup.
static vtkSphericalDirectionEncoder * New()
Construct the object.
int GetEncodedDirection(float n[3])
Given a normal vector n, return the encoded direction.
float * GetDecodedGradient(int value)
/ Given an encoded value, return a pointer to the normal vector
@ value
Definition: vtkX3D.h:220