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 =========================================================================*/
35 #ifndef vtkPerlinNoise_h
36 #define vtkPerlinNoise_h
37 
38 #include "vtkCommonDataModelModule.h" // For export macro
39 #include "vtkImplicitFunction.h"
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
50  static vtkPerlinNoise* New();
51 
53 
57  double EvaluateFunction(double x[3]) override;
59 
64  void EvaluateGradient(double x[3], double n[3]) override;
65 
67 
72  vtkSetVector3Macro(Frequency, double);
73  vtkGetVectorMacro(Frequency, double, 3);
75 
77 
83  vtkSetVector3Macro(Phase, double);
84  vtkGetVectorMacro(Phase, double, 3);
86 
88 
94  vtkSetMacro(Amplitude, double);
95  vtkGetMacro(Amplitude, double);
97 
98 protected:
100  ~vtkPerlinNoise() override = default;
101 
102  double Frequency[3];
103  double Phase[3];
104  double Amplitude;
105 
106 private:
107  vtkPerlinNoise(const vtkPerlinNoise&) = delete;
108  void operator=(const vtkPerlinNoise&) = delete;
109 };
110 
111 #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:39
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