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=========================================================================*/
38#ifndef vtkParametricRandomHills_h
39#define vtkParametricRandomHills_h
40
41#include "vtkCommonComputationalGeometryModule.h" // For export macro
43
44class vtkDoubleArray;
46
47class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills : public vtkParametricFunction
48{
49
50public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
57 int GetDimension() override { return 2; }
58
76
78
82 vtkSetMacro(NumberOfHills, int);
83 vtkGetMacro(NumberOfHills, int);
85
87
91 vtkSetMacro(HillXVariance, double);
92 vtkGetMacro(HillXVariance, double);
94
96
100 vtkSetMacro(HillYVariance, double);
101 vtkGetMacro(HillYVariance, double);
103
105
109 vtkSetMacro(HillAmplitude, double);
110 vtkGetMacro(HillAmplitude, double);
112
114
120 vtkSetMacro(RandomSeed, int);
121 vtkGetMacro(RandomSeed, int);
123
125
138 vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
139 vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
140 vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
142
144
148 vtkSetMacro(XVarianceScaleFactor, double);
149 vtkGetMacro(XVarianceScaleFactor, double);
151
153
157 vtkSetMacro(YVarianceScaleFactor, double);
158 vtkGetMacro(YVarianceScaleFactor, double);
160
162
166 vtkSetMacro(AmplitudeScaleFactor, double);
167 vtkGetMacro(AmplitudeScaleFactor, double);
169
178 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
179
193 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
194
195protected:
198
199 // Variables
209
210 // These variables store the previous values of the above ones.
220
221private:
223 void operator=(const vtkParametricRandomHills&) = delete;
224
228 void InitRNG(int RandomSeed);
229
233 double Rand(void);
234
238 vtkMinimalStandardRandomSequence* randomSequenceGenerator;
239
246 void MakeTheHillData(void);
247
251 bool ParametersChanged();
252
256 void CopyParameters();
257
259
262 vtkDoubleArray* hillData;
264};
265
266#endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:40
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