00001 #ifndef SAMPLEGENERATOR_H 00002 #define SAMPLEGENERATOR_H 00003 00004 00010 class SampleGenerator 00011 { 00012 public: 00013 SampleGenerator() 00014 { 00015 } 00016 00017 virtual ~SampleGenerator() 00018 { 00019 } 00020 00025 virtual void samples(int n, float u[], float v[], float weight[]) const 00026 { 00027 for (int i=0; i < n; i++) 00028 { 00029 u[i] = 0.5; 00030 v[i] = 0.5; 00031 weight[i] = 1.0 / float(n); 00032 } 00033 } 00034 }; 00035 00036 #endif