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
23#ifndef vtkPerlinNoise_h
24#define vtkPerlinNoise_h
25
26#include "vtkCommonDataModelModule.h" // For export macro
27#include "vtkImplicitFunction.h"
28
29VTK_ABI_NAMESPACE_BEGIN
30class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
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
87protected:
89 ~vtkPerlinNoise() override = default;
90
91 double Frequency[3];
92 double Phase[3];
93 double Amplitude;
94
95private:
96 vtkPerlinNoise(const vtkPerlinNoise&) = delete;
97 void operator=(const vtkPerlinNoise&) = delete;
98};
99
100VTK_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.
a simple class to control print indentation
Definition vtkIndent.h:29
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.