VTK  9.3.0
vtkPerlinNoise.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
32#ifndef vtkPerlinNoise_h
33#define vtkPerlinNoise_h
34
35#include "vtkCommonDataModelModule.h" // For export macro
36#include "vtkImplicitFunction.h"
37
38VTK_ABI_NAMESPACE_BEGIN
39class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
40{
41public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
49
51
55 double EvaluateFunction(double x[3]) override;
57
62 void EvaluateGradient(double x[3], double n[3]) override;
63
65
70 vtkSetVector3Macro(Frequency, double);
71 vtkGetVectorMacro(Frequency, double, 3);
73
75
81 vtkSetVector3Macro(Phase, double);
82 vtkGetVectorMacro(Phase, double, 3);
84
86
92 vtkSetMacro(Amplitude, double);
93 vtkGetMacro(Amplitude, double);
95
96protected:
98 ~vtkPerlinNoise() override = default;
99
100 double Frequency[3];
101 double Phase[3];
102 double Amplitude;
103
104private:
105 vtkPerlinNoise(const vtkPerlinNoise&) = delete;
106 void operator=(const vtkPerlinNoise&) = delete;
107};
108
109VTK_ABI_NAMESPACE_END
110#endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition vtkIndent.h:38
an implicit function that implements Perlin noise
void EvaluateGradient(double x[3], double n[3]) override
Evaluate PerlinNoise gradient.
static vtkPerlinNoise * New()
Instantiate the class.
double EvaluateFunction(double x[3]) override
Evaluate PerlinNoise function.
~vtkPerlinNoise() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.