VTK  9.7.20260929
vtkParametricRandomHills.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
124
125#ifndef vtkParametricRandomHills_h
126#define vtkParametricRandomHills_h
127
128#include "vtkCommonComputationalGeometryModule.h" // For export macro
130#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
131
132VTK_ABI_NAMESPACE_BEGIN
133class vtkDoubleArray;
135
136class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT VTK_MARSHALAUTO vtkParametricRandomHills
137 : public vtkParametricFunction
138{
139
140public:
142 void PrintSelf(ostream& os, vtkIndent indent) override;
143
147 int GetDimension() override { return 2; }
148
166
168
172 vtkSetMacro(NumberOfHills, int);
173 vtkGetMacro(NumberOfHills, int);
175
177
181 vtkSetMacro(HillXVariance, double);
182 vtkGetMacro(HillXVariance, double);
184
186
190 vtkSetMacro(HillYVariance, double);
191 vtkGetMacro(HillYVariance, double);
193
195
199 vtkSetMacro(HillAmplitude, double);
200 vtkGetMacro(HillAmplitude, double);
202
204
210 vtkSetMacro(RandomSeed, int);
211 vtkGetMacro(RandomSeed, int);
213
215
228 vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
232
234
238 vtkSetMacro(XVarianceScaleFactor, double);
239 vtkGetMacro(XVarianceScaleFactor, double);
241
243
247 vtkSetMacro(YVarianceScaleFactor, double);
248 vtkGetMacro(YVarianceScaleFactor, double);
250
252
256 vtkSetMacro(AmplitudeScaleFactor, double);
257 vtkGetMacro(AmplitudeScaleFactor, double);
259
268 void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
269
283 double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
284
285protected:
288
289 // Variables
299
300 // These variables store the previous values of the above ones.
310
311private:
313 void operator=(const vtkParametricRandomHills&) = delete;
314
318 void InitRNG(int RandomSeed);
319
323 double Rand();
324
328 vtkMinimalStandardRandomSequence* randomSequenceGenerator;
329
336 void MakeTheHillData();
337
341 bool ParametersChanged();
342
346 void CopyParameters();
347
349
352 vtkDoubleArray* hillData;
354};
355
356VTK_ABI_NAMESPACE_END
357#endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:108
Park and Miller Sequence of pseudo random numbers.
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:64
#define VTK_MARSHALAUTO