VTK  9.4.20241222
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
27VTK_ABI_NAMESPACE_BEGIN
28class VTKRENDERINGVOLUME_EXPORT vtkDirectionEncoder : public vtkObject
29{
30public:
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
53
60 virtual float* GetDecodedGradientTable() = 0;
61
62protected:
64 ~vtkDirectionEncoder() override = default;
65
66private:
68 void operator=(const vtkDirectionEncoder&) = delete;
69};
70
71VTK_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
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
virtual float * GetDecodedGradientTable()=0
Get the decoded gradient table.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
#define VTK_SIZEHINT(...)