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
44class VTKCOMMONDATAMODEL_EXPORT vtkPerlinNoise : public vtkImplicitFunction
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49
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
102protected:
104 ~vtkPerlinNoise() VTK_OVERRIDE {}
105
106 double Frequency[3];
107 double Phase[3];
108 double Amplitude;
109
110private:
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.
a simple class to control print indentation
Definition: vtkIndent.h:40
an implicit function that implements Perlin noise
void EvaluateGradient(double x[3], double n[3]) override
Evaluate PerlinNoise gradient.
double EvaluateFunction(double x, double y, double z)
~vtkPerlinNoise() override
static vtkPerlinNoise * New()
Instantiate the class.
double EvaluateFunction(double x[3]) override
Evaluate PerlinNoise function.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.