VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
33 #ifndef __vtkParametricRandomHills_h
34 #define __vtkParametricRandomHills_h
35 
36 #include "vtkCommonComputationalGeometryModule.h" // For export macro
37 #include "vtkParametricFunction.h"
38 
39 class vtkDoubleArray;
40 
42 {
43 
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49  virtual int GetDimension() {return 2;}
50 
59  static vtkParametricRandomHills *New();
60 
62 
63  vtkSetMacro(NumberOfHills,int);
64  vtkGetMacro(NumberOfHills,int);
66 
68 
69  vtkSetMacro(HillXVariance,double);
70  vtkGetMacro(HillXVariance,double);
72 
74 
75  vtkSetMacro(HillYVariance,double);
76  vtkGetMacro(HillYVariance,double);
78 
80 
81  vtkSetMacro(HillAmplitude,double);
82  vtkGetMacro(HillAmplitude,double);
84 
86 
89  vtkSetMacro(RandomSeed,int);
90  vtkGetMacro(RandomSeed,int);
92 
94 
98  vtkSetMacro(AllowRandomGeneration,int);
99  vtkGetMacro(AllowRandomGeneration,int);
100  vtkBooleanMacro(AllowRandomGeneration,int);
102 
104 
106  vtkSetMacro(XVarianceScaleFactor,double);
107  vtkGetMacro(XVarianceScaleFactor,double);
109 
111 
113  vtkSetMacro(YVarianceScaleFactor,double);
114  vtkGetMacro(YVarianceScaleFactor,double);
116 
118 
119  vtkSetMacro(AmplitudeScaleFactor,double);
120  vtkGetMacro(AmplitudeScaleFactor,double);
122 
128  void GenerateTheHills( void );
129 
138  virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]);
139 
148  virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]);
149 
150 protected:
153 
154  // Variables
164 
165 private:
166  vtkParametricRandomHills(const vtkParametricRandomHills&); // Not implemented.
167  void operator=(const vtkParametricRandomHills&); // Not implemented.
168 
170  void InitSeed ( int RandomSeed );
171 
173  double Rand ( void );
174 
176 
177  vtkDoubleArray * hillData;
178 };
180 
181 #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
static vtkObject * New()