VTK  9.2.6
vtkPerlinNoise.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPerlinNoise.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
54 #ifndef vtkPerlinNoise_h
55 #define vtkPerlinNoise_h
56 
57 #include "vtkCommonDataModelModule.h" // For export macro
58 #include "vtkImplicitFunction.h"
59 
60 class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
69  static vtkPerlinNoise* New();
70 
72 
76  double EvaluateFunction(double x[3]) override;
78 
83  void EvaluateGradient(double x[3], double n[3]) override;
84 
86 
91  vtkSetVector3Macro(Frequency, double);
92  vtkGetVectorMacro(Frequency, double, 3);
94 
96 
102  vtkSetVector3Macro(Phase, double);
103  vtkGetVectorMacro(Phase, double, 3);
105 
107 
113  vtkSetMacro(Amplitude, double);
114  vtkGetMacro(Amplitude, double);
116 
117 protected:
119  ~vtkPerlinNoise() override = default;
120 
121  double Frequency[3];
122  double Phase[3];
123  double Amplitude;
124 
125 private:
126  vtkPerlinNoise(const vtkPerlinNoise&) = delete;
127  void operator=(const vtkPerlinNoise&) = delete;
128 };
129 
130 #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:119
an implicit function that implements Perlin noise
void EvaluateGradient(double x[3], double n[3]) override
Evaluate PerlinNoise gradient.
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.
static vtkPerlinNoise * New()
Instantiate the class.