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=========================================================================*/
137#ifndef vtkParametricRandomHills_h
138#define vtkParametricRandomHills_h
139
140#include "vtkCommonComputationalGeometryModule.h" // For export macro
142
143class vtkDoubleArray;
145
146class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills : public vtkParametricFunction
147{
148
149public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152
156 int GetDimension() override { return 2; }
157
175
177
181 vtkSetMacro(NumberOfHills, int);
182 vtkGetMacro(NumberOfHills, int);
184
186
190 vtkSetMacro(HillXVariance, double);
191 vtkGetMacro(HillXVariance, double);
193
195
199 vtkSetMacro(HillYVariance, double);
200 vtkGetMacro(HillYVariance, double);
202
204
208 vtkSetMacro(HillAmplitude, double);
209 vtkGetMacro(HillAmplitude, double);
211
213
219 vtkSetMacro(RandomSeed, int);
220 vtkGetMacro(RandomSeed, int);
222
224
237 vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
238 vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
239 vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
241
243
247 vtkSetMacro(XVarianceScaleFactor, double);
248 vtkGetMacro(XVarianceScaleFactor, double);
250
252
256 vtkSetMacro(YVarianceScaleFactor, double);
257 vtkGetMacro(YVarianceScaleFactor, double);
259
261
265 vtkSetMacro(AmplitudeScaleFactor, double);
266 vtkGetMacro(AmplitudeScaleFactor, double);
268
277 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
278
292 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
293
294protected:
297
298 // Variables
308
309 // These variables store the previous values of the above ones.
319
320private:
322 void operator=(const vtkParametricRandomHills&) = delete;
323
327 void InitRNG(int RandomSeed);
328
332 double Rand(void);
333
337 vtkMinimalStandardRandomSequence* randomSequenceGenerator;
338
345 void MakeTheHillData(void);
346
350 bool ParametersChanged();
351
355 void CopyParameters();
356
358
361 vtkDoubleArray* hillData;
363};
364
365#endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:119
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