VTK  9.1.0
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=========================================================================*/
51#ifndef vtkPerlinNoise_h
52#define vtkPerlinNoise_h
53
54#include "vtkCommonDataModelModule.h" // For export macro
55#include "vtkImplicitFunction.h"
56
57class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
58{
59public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
67
69
73 double EvaluateFunction(double x[3]) override;
75
80 void EvaluateGradient(double x[3], double n[3]) override;
81
83
88 vtkSetVector3Macro(Frequency, double);
89 vtkGetVectorMacro(Frequency, double, 3);
91
93
99 vtkSetVector3Macro(Phase, double);
100 vtkGetVectorMacro(Phase, double, 3);
102
104
110 vtkSetMacro(Amplitude, double);
111 vtkGetMacro(Amplitude, double);
113
114protected:
116 ~vtkPerlinNoise() override = default;
117
118 double Frequency[3];
119 double Phase[3];
120 double Amplitude;
121
122private:
123 vtkPerlinNoise(const vtkPerlinNoise&) = delete;
124 void operator=(const vtkPerlinNoise&) = delete;
125};
126
127#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:113
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.