VTK  9.0.3
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 =========================================================================*/
35 #ifndef vtkParametricRandomHills_h
36 #define vtkParametricRandomHills_h
37 
38 #include "vtkCommonComputationalGeometryModule.h" // For export macro
39 #include "vtkParametricFunction.h"
40 
41 class vtkDoubleArray;
43 
44 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills : public vtkParametricFunction
45 {
46 
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  int GetDimension() override { return 2; }
55 
73 
75 
79  vtkSetMacro(NumberOfHills, int);
80  vtkGetMacro(NumberOfHills, int);
82 
84 
88  vtkSetMacro(HillXVariance, double);
89  vtkGetMacro(HillXVariance, double);
91 
93 
97  vtkSetMacro(HillYVariance, double);
98  vtkGetMacro(HillYVariance, double);
100 
102 
106  vtkSetMacro(HillAmplitude, double);
107  vtkGetMacro(HillAmplitude, double);
109 
111 
117  vtkSetMacro(RandomSeed, int);
118  vtkGetMacro(RandomSeed, int);
120 
122 
135  vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
136  vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
137  vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
139 
141 
145  vtkSetMacro(XVarianceScaleFactor, double);
146  vtkGetMacro(XVarianceScaleFactor, double);
148 
150 
154  vtkSetMacro(YVarianceScaleFactor, double);
155  vtkGetMacro(YVarianceScaleFactor, double);
157 
159 
163  vtkSetMacro(AmplitudeScaleFactor, double);
164  vtkGetMacro(AmplitudeScaleFactor, double);
166 
175  void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
176 
190  double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]) override;
191 
192 protected:
195 
196  // Variables
206 
207  // These variables store the previous values of the above ones.
217 
218 private:
220  void operator=(const vtkParametricRandomHills&) = delete;
221 
225  void InitRNG(int RandomSeed);
226 
230  double Rand(void);
231 
235  vtkMinimalStandardRandomSequence* randomSequenceGenerator;
236 
243  void MakeTheHillData(void);
244 
248  bool ParametersChanged();
249 
253  void CopyParameters();
254 
256 
259  vtkDoubleArray* hillData;
260 };
262 
263 #endif
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:34
Park and Miller Sequence of pseudo random numbers.
abstract interface for parametric functions
Generate a surface covered with randomly placed hills.
static vtkParametricRandomHills * New()
Construct a surface of random hills with the following parameters: MinimumU = -10,...
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.
~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