VTK  9.3.20240424
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
42#ifndef vtkPerlinNoise_h
43#define vtkPerlinNoise_h
44
45#include "vtkCommonDataModelModule.h" // For export macro
46#include "vtkImplicitFunction.h"
47
48VTK_ABI_NAMESPACE_BEGIN
49class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
50{
51public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
59
61
65 double EvaluateFunction(double x[3]) override;
67
72 void EvaluateGradient(double x[3], double n[3]) override;
73
75
80 vtkSetVector3Macro(Frequency, double);
81 vtkGetVectorMacro(Frequency, double, 3);
83
85
91 vtkSetVector3Macro(Phase, double);
92 vtkGetVectorMacro(Phase, double, 3);
94
96
102 vtkSetMacro(Amplitude, double);
103 vtkGetMacro(Amplitude, double);
105
106protected:
108 ~vtkPerlinNoise() override = default;
109
110 double Frequency[3];
111 double Phase[3];
112 double Amplitude;
113
114private:
115 vtkPerlinNoise(const vtkPerlinNoise&) = delete;
116 void operator=(const vtkPerlinNoise&) = delete;
117};
118
119VTK_ABI_NAMESPACE_END
120#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:108
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.