VTK  9.1.0
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=========================================================================*/
44#ifndef vtkParametricRandomHills_h
45#define vtkParametricRandomHills_h
46
47#include "vtkCommonComputationalGeometryModule.h" // For export macro
49
50class vtkDoubleArray;
52
53class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills : public vtkParametricFunction
54{
55
56public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
63 int GetDimension() override { return 2; }
64
82
84
88 vtkSetMacro(NumberOfHills, int);
89 vtkGetMacro(NumberOfHills, int);
91
93
97 vtkSetMacro(HillXVariance, double);
98 vtkGetMacro(HillXVariance, double);
100
102
106 vtkSetMacro(HillYVariance, double);
107 vtkGetMacro(HillYVariance, double);
109
111
115 vtkSetMacro(HillAmplitude, double);
116 vtkGetMacro(HillAmplitude, double);
118
120
126 vtkSetMacro(RandomSeed, int);
127 vtkGetMacro(RandomSeed, int);
129
131
144 vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
145 vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
146 vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
148
150
154 vtkSetMacro(XVarianceScaleFactor, double);
155 vtkGetMacro(XVarianceScaleFactor, double);
157
159
163 vtkSetMacro(YVarianceScaleFactor, double);
164 vtkGetMacro(YVarianceScaleFactor, double);
166
168
172 vtkSetMacro(AmplitudeScaleFactor, double);
173 vtkGetMacro(AmplitudeScaleFactor, double);
175
184 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
185
199 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
200
201protected:
204
205 // Variables
215
216 // These variables store the previous values of the above ones.
226
227private:
229 void operator=(const vtkParametricRandomHills&) = delete;
230
234 void InitRNG(int RandomSeed);
235
239 double Rand(void);
240
244 vtkMinimalStandardRandomSequence* randomSequenceGenerator;
245
252 void MakeTheHillData(void);
253
257 bool ParametersChanged();
258
262 void CopyParameters();
263
265
268 vtkDoubleArray* hillData;
270};
271
272#endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:43
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