VTK
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 =========================================================================*/
38 #ifndef vtkPerlinNoise_h
39 #define vtkPerlinNoise_h
40 
41 #include "vtkCommonDataModelModule.h" // For export macro
42 #include "vtkImplicitFunction.h"
43 
44 class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
53  static vtkPerlinNoise *New();
54 
56 
60  double EvaluateFunction(double x[3]) override;
62 
67  void EvaluateGradient(double x[3], double n[3]) override;
68 
70 
75  vtkSetVector3Macro(Frequency,double);
76  vtkGetVectorMacro(Frequency,double,3);
78 
80 
86  vtkSetVector3Macro(Phase,double);
87  vtkGetVectorMacro(Phase,double,3);
89 
91 
97  vtkSetMacro(Amplitude,double);
98  vtkGetMacro(Amplitude,double);
100 
101 protected:
102  vtkPerlinNoise();
103  ~vtkPerlinNoise() override {}
104 
105  double Frequency[3];
106  double Phase[3];
107  double Amplitude;
108 
109 private:
110  vtkPerlinNoise(const vtkPerlinNoise&) = delete;
111  void operator=(const vtkPerlinNoise&) = delete;
112 };
113 
114 #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.
~vtkPerlinNoise() override
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