VTK  9.3.1
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
23 #ifndef vtkPerlinNoise_h
24 #define vtkPerlinNoise_h
25 
26 #include "vtkCommonDataModelModule.h" // For export macro
27 #include "vtkImplicitFunction.h"
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
31 {
32 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
39  static vtkPerlinNoise* New();
40 
42 
46  double EvaluateFunction(double x[3]) override;
48 
53  void EvaluateGradient(double x[3], double n[3]) override;
54 
56 
61  vtkSetVector3Macro(Frequency, double);
62  vtkGetVectorMacro(Frequency, double, 3);
64 
66 
72  vtkSetVector3Macro(Phase, double);
73  vtkGetVectorMacro(Phase, double, 3);
75 
77 
83  vtkSetMacro(Amplitude, double);
84  vtkGetMacro(Amplitude, double);
86 
87 protected:
89  ~vtkPerlinNoise() override = default;
90 
91  double Frequency[3];
92  double Phase[3];
93  double Amplitude;
94 
95 private:
96  vtkPerlinNoise(const vtkPerlinNoise&) = delete;
97  void operator=(const vtkPerlinNoise&) = delete;
98 };
99 
100 VTK_ABI_NAMESPACE_END
101 #endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
an implicit function that implements Perlin noise