VTK  9.3.20240418
vtkDirectionEncoder.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
21 #ifndef vtkDirectionEncoder_h
22 #define vtkDirectionEncoder_h
23 
24 #include "vtkObject.h"
25 #include "vtkRenderingVolumeModule.h" // For export macro
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class VTKRENDERINGVOLUME_EXPORT vtkDirectionEncoder : public vtkObject
29 {
30 public:
32 
36  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  virtual int GetEncodedDirection(float n[3]) = 0;
43 
47  virtual float* GetDecodedGradient(int value) VTK_SIZEHINT(3) = 0;
48 
52  virtual int GetNumberOfEncodedDirections() = 0;
53 
60  virtual float* GetDecodedGradientTable() = 0;
61 
62 protected:
63  vtkDirectionEncoder() = default;
64  ~vtkDirectionEncoder() override = default;
65 
66 private:
68  void operator=(const vtkDirectionEncoder&) = delete;
69 };
70 
71 VTK_ABI_NAMESPACE_END
72 #endif
encode a direction into a one or two byte value
virtual int GetNumberOfEncodedDirections()=0
Return the number of encoded directions.
virtual int GetEncodedDirection(float n[3])=0
Given a normal vector n, return the encoded direction.
vtkDirectionEncoder()=default
virtual float * GetDecodedGradientTable()=0
Get the decoded gradient table.
void PrintSelf(ostream &os, vtkIndent indent) override
Get the name of this class.
~vtkDirectionEncoder() override=default
virtual float * GetDecodedGradient(int value)=0
/ Given an encoded value, return a pointer to the normal vector
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
@ value
Definition: vtkX3D.h:220
#define VTK_SIZEHINT(...)