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=========================================================================*/
44#ifndef vtkPerlinNoise_h
45#define vtkPerlinNoise_h
46
47#include "vtkCommonDataModelModule.h" // For export macro
48#include "vtkImplicitFunction.h"
49
50class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
51{
52public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
60
62
66 double EvaluateFunction(double x[3]) override;
68
73 void EvaluateGradient(double x[3], double n[3]) override;
74
76
81 vtkSetVector3Macro(Frequency, double);
82 vtkGetVectorMacro(Frequency, double, 3);
84
86
92 vtkSetVector3Macro(Phase, double);
93 vtkGetVectorMacro(Phase, double, 3);
95
97
103 vtkSetMacro(Amplitude, double);
104 vtkGetMacro(Amplitude, double);
106
107protected:
109 ~vtkPerlinNoise() override = default;
110
111 double Frequency[3];
112 double Phase[3];
113 double Amplitude;
114
115private:
116 vtkPerlinNoise(const vtkPerlinNoise&) = delete;
117 void operator=(const vtkPerlinNoise&) = delete;
118};
119
120#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:49
an implicit function that implements Perlin noise
void EvaluateGradient(double x[3], double n[3]) override
Evaluate PerlinNoise gradient.
static vtkPerlinNoise * New()
Instantiate the class.
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.