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=========================================================================*/
134#ifndef vtkParametricRandomHills_h
135#define vtkParametricRandomHills_h
136
137#include "vtkCommonComputationalGeometryModule.h" // For export macro
139
140class vtkDoubleArray;
142
143class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills : public vtkParametricFunction
144{
145
146public:
148 void PrintSelf(ostream& os, vtkIndent indent) override;
149
153 int GetDimension() override { return 2; }
154
172
174
178 vtkSetMacro(NumberOfHills, int);
179 vtkGetMacro(NumberOfHills, int);
181
183
187 vtkSetMacro(HillXVariance, double);
188 vtkGetMacro(HillXVariance, double);
190
192
196 vtkSetMacro(HillYVariance, double);
197 vtkGetMacro(HillYVariance, double);
199
201
205 vtkSetMacro(HillAmplitude, double);
206 vtkGetMacro(HillAmplitude, double);
208
210
216 vtkSetMacro(RandomSeed, int);
217 vtkGetMacro(RandomSeed, int);
219
221
234 vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
235 vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
236 vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
238
240
244 vtkSetMacro(XVarianceScaleFactor, double);
245 vtkGetMacro(XVarianceScaleFactor, double);
247
249
253 vtkSetMacro(YVarianceScaleFactor, double);
254 vtkGetMacro(YVarianceScaleFactor, double);
256
258
262 vtkSetMacro(AmplitudeScaleFactor, double);
263 vtkGetMacro(AmplitudeScaleFactor, double);
265
274 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
275
289 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
290
291protected:
294
295 // Variables
305
306 // These variables store the previous values of the above ones.
316
317private:
319 void operator=(const vtkParametricRandomHills&) = delete;
320
324 void InitRNG(int RandomSeed);
325
329 double Rand(void);
330
334 vtkMinimalStandardRandomSequence* randomSequenceGenerator;
335
342 void MakeTheHillData(void);
343
347 bool ParametersChanged();
348
352 void CopyParameters();
353
355
358 vtkDoubleArray* hillData;
360};
361
362#endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:113
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