VTK
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
42 #include "vtkParametricFunction.h"
43 
44 class vtkDoubleArray;
46 
47 class VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT vtkParametricRandomHills :
49 {
50 
51  public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
58  int GetDimension() override {return 2;}
59 
76  static vtkParametricRandomHills *New();
77 
79 
83  vtkSetMacro(NumberOfHills, int);
84  vtkGetMacro(NumberOfHills, int);
86 
88 
92  vtkSetMacro(HillXVariance, double);
93  vtkGetMacro(HillXVariance, double);
95 
97 
101  vtkSetMacro(HillYVariance, double);
102  vtkGetMacro(HillYVariance, double);
104 
106 
110  vtkSetMacro(HillAmplitude, double);
111  vtkGetMacro(HillAmplitude, double);
113 
115 
121  vtkSetMacro(RandomSeed, int);
122  vtkGetMacro(RandomSeed, int);
124 
126 
139  vtkSetClampMacro(AllowRandomGeneration, vtkTypeBool, 0, 1);
140  vtkGetMacro(AllowRandomGeneration, vtkTypeBool);
141  vtkBooleanMacro(AllowRandomGeneration, vtkTypeBool);
143 
145 
149  vtkSetMacro(XVarianceScaleFactor, double);
150  vtkGetMacro(XVarianceScaleFactor, double);
152 
154 
158  vtkSetMacro(YVarianceScaleFactor, double);
159  vtkGetMacro(YVarianceScaleFactor, double);
161 
163 
167  vtkSetMacro(AmplitudeScaleFactor, double);
168  vtkGetMacro(AmplitudeScaleFactor, double);
170 
179  void Evaluate(double uvw[3], double Pt[3], double Duvw[9]) override;
180 
194  double EvaluateScalar(double uvw[3], double Pt[3],
195  double Duvw[9]) override;
196 
197  protected:
199  ~vtkParametricRandomHills() override;
200 
201  // Variables
211 
212  // These variables store the previous values of the above ones.
222 
223  private:
225  void operator=(const vtkParametricRandomHills&) = delete;
226 
230  void InitRNG(int RandomSeed);
231 
235  double Rand(void);
236 
240  vtkMinimalStandardRandomSequence *randomSequenceGenerator;
241 
248  void MakeTheHillData(void);
249 
253  bool ParametersChanged();
254 
258  void CopyParameters();
259 
261 
264  vtkDoubleArray *hillData;
265 };
267 
268 #endif
Generate a surface covered with randomly placed hills.
virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9])=0
Calculate a user defined scalar using one or all of uvw, Pt, Duvw.
virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9])=0
Performs the mapping $f(uvw)->(Pt,Duvw)$f.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetDimension() override
Return the parametric dimension of the class.
dynamic, self-adjusting array of double
int vtkTypeBool
Definition: vtkABI.h:69
abstract interface for parametric functions
a simple class to control print indentation
Definition: vtkIndent.h:39
Park and Miller Sequence of pseudo random numbers.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...