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 =========================================================================*/
33 #ifndef __vtkParametricRandomHills_h
34 #define __vtkParametricRandomHills_h
35 
36 #include "vtkParametricFunction.h"
37 
38 class vtkDoubleArray;
39 
41 {
42 
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48  virtual int GetDimension() {return 2;}
49 
58  static vtkParametricRandomHills *New();
59 
61 
62  vtkSetMacro(NumberOfHills,int);
63  vtkGetMacro(NumberOfHills,int);
65 
67 
68  vtkSetMacro(HillXVariance,double);
69  vtkGetMacro(HillXVariance,double);
71 
73 
74  vtkSetMacro(HillYVariance,double);
75  vtkGetMacro(HillYVariance,double);
77 
79 
80  vtkSetMacro(HillAmplitude,double);
81  vtkGetMacro(HillAmplitude,double);
83 
85 
88  vtkSetMacro(RandomSeed,int);
89  vtkGetMacro(RandomSeed,int);
91 
93 
97  vtkSetMacro(AllowRandomGeneration,int);
98  vtkGetMacro(AllowRandomGeneration,int);
99  vtkBooleanMacro(AllowRandomGeneration,int);
101 
103 
105  vtkSetMacro(XVarianceScaleFactor,double);
106  vtkGetMacro(XVarianceScaleFactor,double);
108 
110 
112  vtkSetMacro(YVarianceScaleFactor,double);
113  vtkGetMacro(YVarianceScaleFactor,double);
115 
117 
118  vtkSetMacro(AmplitudeScaleFactor,double);
119  vtkGetMacro(AmplitudeScaleFactor,double);
121 
127  void GenerateTheHills( void );
128 
137  virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]);
138 
147  virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]);
148 
149 protected:
152 
153  // Variables
163 
164 private:
165  vtkParametricRandomHills(const vtkParametricRandomHills&); // Not implemented.
166  void operator=(const vtkParametricRandomHills&); // Not implemented.
167 
169  void InitSeed ( int RandomSeed );
170 
172  double Rand ( void );
173 
175 
176  vtkDoubleArray * hillData;
177 };
179 
180 #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
abstract interface for parametric functions
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_COMMON_EXPORT
static vtkObject * New()