VTK  9.0.1
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 =========================================================================*/
32 #ifndef vtkPerlinNoise_h
33 #define vtkPerlinNoise_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkImplicitFunction.h"
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
47  static vtkPerlinNoise* New();
48 
50 
54  double EvaluateFunction(double x[3]) override;
56 
61  void EvaluateGradient(double x[3], double n[3]) override;
62 
64 
69  vtkSetVector3Macro(Frequency, double);
70  vtkGetVectorMacro(Frequency, double, 3);
72 
74 
80  vtkSetVector3Macro(Phase, double);
81  vtkGetVectorMacro(Phase, double, 3);
83 
85 
91  vtkSetMacro(Amplitude, double);
92  vtkGetMacro(Amplitude, double);
94 
95 protected:
97  ~vtkPerlinNoise() override {}
98 
99  double Frequency[3];
100  double Phase[3];
101  double Amplitude;
102 
103 private:
104  vtkPerlinNoise(const vtkPerlinNoise&) = delete;
105  void operator=(const vtkPerlinNoise&) = delete;
106 };
107 
108 #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:34
an implicit function that implements Perlin noise
void EvaluateGradient(double x[3], double n[3]) override
Evaluate PerlinNoise gradient.
~vtkPerlinNoise() override
double EvaluateFunction(double x[3]) override
Evaluate function at position x-y-z and return value.
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.