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 =========================================================================*/
37 #ifndef vtkParametricRandomHills_h
38 #define vtkParametricRandomHills_h
39 
40 #include "vtkCommonComputationalGeometryModule.h" // For export macro
41 #include "vtkParametricFunction.h"
42 
43 class vtkDoubleArray;
45 
47 {
48 
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54  virtual int GetDimension() {return 2;}
55 
64  static vtkParametricRandomHills *New();
65 
67 
68  vtkSetMacro(NumberOfHills,int);
69  vtkGetMacro(NumberOfHills,int);
71 
73 
74  vtkSetMacro(HillXVariance,double);
75  vtkGetMacro(HillXVariance,double);
77 
79 
80  vtkSetMacro(HillYVariance,double);
81  vtkGetMacro(HillYVariance,double);
83 
85 
86  vtkSetMacro(HillAmplitude,double);
87  vtkGetMacro(HillAmplitude,double);
89 
91 
94  vtkSetMacro(RandomSeed,int);
95  vtkGetMacro(RandomSeed,int);
97 
99 
107  vtkSetClampMacro(AllowRandomGeneration,int,0,1);
108  vtkGetMacro(AllowRandomGeneration,int);
109  vtkBooleanMacro(AllowRandomGeneration,int);
111 
113 
115  vtkSetMacro(XVarianceScaleFactor,double);
116  vtkGetMacro(XVarianceScaleFactor,double);
118 
120 
122  vtkSetMacro(YVarianceScaleFactor,double);
123  vtkGetMacro(YVarianceScaleFactor,double);
125 
127 
128  vtkSetMacro(AmplitudeScaleFactor,double);
129  vtkGetMacro(AmplitudeScaleFactor,double);
131 
137  VTK_LEGACY(void GenerateTheHills(void));
138 
144  virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]);
145 
154  virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]);
155 
156 protected:
159 
160  // Variables
170 
171  // These variables store the previous values of the above ones.
181 
182 private:
183  vtkParametricRandomHills(const vtkParametricRandomHills&); // Not implemented.
184  void operator=(const vtkParametricRandomHills&); // Not implemented.
185 
187  void InitRNG ( int RandomSeed );
188 
190  double Rand ( void );
191 
193  vtkMinimalStandardRandomSequence *randomSequenceGenerator;
194 
199  void MakeTheHillData( void );
200 
202  bool ParametersChanged();
203 
205  void CopyParameters();
206 
208 
209  vtkDoubleArray *hillData;
210 };
212 
213 #endif
Generate a surface covered with randomly placed hills.
virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9])=0
virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9])=0
void PrintSelf(ostream &os, vtkIndent indent)
dynamic, self-adjusting array of double
#define VTKCOMMONCOMPUTATIONALGEOMETRY_EXPORT
abstract interface for parametric functions
a simple class to control print indentation
Definition: vtkIndent.h:38
Park and Miller Sequence of pseudo random numbers.
static vtkObject * New()