Rev | Line | |
---|
[2853] | 1 | #ifndef __SAMPLEGENERATOR_H
|
---|
| 2 | #define __SAMPLEGENERATOR_H
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | /** Class that generates samples on a circle
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | struct Sample2
|
---|
| 9 | {
|
---|
| 10 | float x;
|
---|
| 11 | float y;
|
---|
| 12 | };
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | class SampleGenerator
|
---|
| 16 | {
|
---|
| 17 | public:
|
---|
| 18 |
|
---|
| 19 | SampleGenerator(int numSamples, float radius);
|
---|
| 20 |
|
---|
| 21 | virtual void Generate(Sample2 *samples) const = 0;
|
---|
| 22 |
|
---|
| 23 | protected:
|
---|
| 24 |
|
---|
| 25 | SampleGenerator() {};
|
---|
| 26 |
|
---|
| 27 | int mNumSamples;
|
---|
| 28 | float mRadius;
|
---|
| 29 | };
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | class PoissonDiscSampleGenerator: public SampleGenerator
|
---|
| 33 | {
|
---|
| 34 | public:
|
---|
| 35 | PoissonDiscSampleGenerator(int numSamples, float radius);
|
---|
| 36 |
|
---|
| 37 | virtual void Generate(Sample2 *samples) const;
|
---|
| 38 | };
|
---|
| 39 |
|
---|
| 40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.