SampleGenerator.cpp
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @file SampleGenerator.h 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @date Fall 2008 00005 00006 @brief 00007 Point sample generation over the 2D unit interval [0,1]^2 00008 00009 @see Viewport 00010 @see SampleGeneratorThread 00011 <!-------------------------------------------------------------------->**/ 00012 00013 #include "SampleGenerator.h" 00014 #include "generators.h" 00015 #include <QtCore> 00016 00017 void SampleGenerator::init() 00018 { } 00019 00020 void SampleGenerator::_addSample(const PointSample &s, 00021 PointSampleList &samples) 00022 { 00023 samples.push_back(s); 00024 } 00025 00026 SampleGenerator *SampleGenerator::create(const std::string &type) 00027 { 00028 if (type == "uniform" || type == "default") { 00029 return new UniformSampleGenerator(); 00030 } else if (type == "stochastic") { 00031 return new StochasticSampleGenerator(); 00032 } else if (type == "jittered") { 00033 return new JitteredSampleGenerator(); 00034 } else if (type == "dissolve") { 00035 return new DissolveSampleGenerator(); 00036 } else if (type == "hilbert") { 00037 return new HilbertSampleGenerator(); 00038 } else { 00039 ASSERT(0 && "encountered unknown sample type\n"); 00040 } 00041 00042 return NULL; 00043 } 00044
Generated on 28 Feb 2009 for Milton by
1.5.6