00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkParametricRandomHills_h
00034 #define __vtkParametricRandomHills_h
00035
00036 #include "vtkParametricFunction.h"
00037
00038 class vtkDoubleArray;
00039
00040 class VTK_COMMON_EXPORT vtkParametricRandomHills : public vtkParametricFunction
00041 {
00042
00043 public:
00044 vtkTypeRevisionMacro(vtkParametricRandomHills,vtkParametricFunction);
00045 void PrintSelf(ostream& os, vtkIndent indent);
00046
00048 virtual int GetDimension() {return 2;}
00049
00058 static vtkParametricRandomHills *New();
00059
00061
00062 vtkSetMacro(NumberOfHills,int);
00063 vtkGetMacro(NumberOfHills,int);
00065
00067
00068 vtkSetMacro(HillXVariance,double);
00069 vtkGetMacro(HillXVariance,double);
00071
00073
00074 vtkSetMacro(HillYVariance,double);
00075 vtkGetMacro(HillYVariance,double);
00077
00079
00080 vtkSetMacro(HillAmplitude,double);
00081 vtkGetMacro(HillAmplitude,double);
00083
00085
00088 vtkSetMacro(RandomSeed,int);
00089 vtkGetMacro(RandomSeed,int);
00091
00093
00097 vtkSetMacro(AllowRandomGeneration,int);
00098 vtkGetMacro(AllowRandomGeneration,int);
00099 vtkBooleanMacro(AllowRandomGeneration,int);
00101
00103
00105 vtkSetMacro(XVarianceScaleFactor,double);
00106 vtkGetMacro(XVarianceScaleFactor,double);
00108
00110
00112 vtkSetMacro(YVarianceScaleFactor,double);
00113 vtkGetMacro(YVarianceScaleFactor,double);
00115
00117
00118 vtkSetMacro(AmplitudeScaleFactor,double);
00119 vtkGetMacro(AmplitudeScaleFactor,double);
00121
00127 void GenerateTheHills( void );
00128
00137 virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]);
00138
00147 virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]);
00148
00149 protected:
00150 vtkParametricRandomHills();
00151 ~vtkParametricRandomHills();
00152
00153
00154 int NumberOfHills;
00155 double HillXVariance;
00156 double HillYVariance;
00157 double HillAmplitude;
00158 int RandomSeed;
00159 double XVarianceScaleFactor;
00160 double YVarianceScaleFactor;
00161 double AmplitudeScaleFactor;
00162 int AllowRandomGeneration;
00163
00164 private:
00165 vtkParametricRandomHills(const vtkParametricRandomHills&);
00166 void operator=(const vtkParametricRandomHills&);
00167
00169 void InitSeed ( int RandomSeed );
00170
00172 double Rand ( void );
00173
00175 vtkDoubleArray * hillData;
00176 };
00177
00178 #endif