VTK  9.2.6
vtkParametricRandomHills.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkParametricRandomHills.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=========================================================================*/
47#ifndef vtkParametricRandomHills_h
48#define vtkParametricRandomHills_h
49
50#include "vtkCommonComputationalGeometryModule.h" // For export macro
52
53class vtkDoubleArray;
55
56class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills : public vtkParametricFunction
57{
58
59public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
66 int GetDimension() override { return 2; }
67
85
87
91 vtkSetMacro(NumberOfHills, int);
92 vtkGetMacro(NumberOfHills, int);
94
96
100 vtkSetMacro(HillXVariance, double);
101 vtkGetMacro(HillXVariance, double);
103
105
109 vtkSetMacro(HillYVariance, double);
110 vtkGetMacro(HillYVariance, double);
112
114
118 vtkSetMacro(HillAmplitude, double);
119 vtkGetMacro(HillAmplitude, double);
121
123
129 vtkSetMacro(RandomSeed, int);
130 vtkGetMacro(RandomSeed, int);
132
134
147 vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
148 vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
149 vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
151
153
157 vtkSetMacro(XVarianceScaleFactor, double);
158 vtkGetMacro(XVarianceScaleFactor, double);
160
162
166 vtkSetMacro(YVarianceScaleFactor, double);
167 vtkGetMacro(YVarianceScaleFactor, double);
169
171
175 vtkSetMacro(AmplitudeScaleFactor, double);
176 vtkGetMacro(AmplitudeScaleFactor, double);
178
187 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
188
202 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
203
204protected:
207
208 // Variables
218
219 // These variables store the previous values of the above ones.
229
230private:
232 void operator=(const vtkParametricRandomHills&) = delete;
233
237 void InitRNG(int RandomSeed);
238
242 double Rand(void);
243
247 vtkMinimalStandardRandomSequence* randomSequenceGenerator;
248
255 void MakeTheHillData(void);
256
260 bool ParametersChanged();
261
265 void CopyParameters();
266
268
271 vtkDoubleArray* hillData;
273};
274
275#endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:49
Park and Miller Sequence of pseudo random numbers.
abstract interface for parametric functions
Generate a surface covered with randomly placed hills.
int GetDimension() override
Return the parametric dimension of the class.
double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override
Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkParametricRandomHills * New()
Construct a surface of random hills with the following parameters: MinimumU = -10,...
~vtkParametricRandomHills() override
void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override
Construct a terrain consisting of hills on a surface.
int vtkTypeBool
Definition vtkABI.h:69