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) VTK_OVERRIDE;
49 
53  static vtkPerlinNoise *New();
54 
56 
59  double EvaluateFunction(double x[3]) VTK_OVERRIDE;
60  double EvaluateFunction(double x, double y, double z)
61  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
63 
68  void EvaluateGradient(double x[3], double n[3]) VTK_OVERRIDE;
69 
71 
76  vtkSetVector3Macro(Frequency,double);
77  vtkGetVectorMacro(Frequency,double,3);
79 
81 
87  vtkSetVector3Macro(Phase,double);
88  vtkGetVectorMacro(Phase,double,3);
90 
92 
98  vtkSetMacro(Amplitude,double);
99  vtkGetMacro(Amplitude,double);
101 
102 protected:
103  vtkPerlinNoise();
104  ~vtkPerlinNoise() VTK_OVERRIDE {}
105 
106  double Frequency[3];
107  double Phase[3];
108  double Amplitude;
109 
110 private:
111  vtkPerlinNoise(const vtkPerlinNoise&) VTK_DELETE_FUNCTION;
112  void operator=(const vtkPerlinNoise&) VTK_DELETE_FUNCTION;
113 };
114 
115 #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
double EvaluateFunction(double x, double y, double z)
Evaluate PerlinNoise function.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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