diff -r a6413a3d741d -r 228cb8bfdd54 include/sampler.h --- a/include/sampler.h Fri Mar 28 23:30:04 2008 +0100 +++ b/include/sampler.h Sat Mar 29 02:17:22 2008 +0100 @@ -37,8 +37,10 @@ */ class Sample { + friend class Sampler; public: Float x,y; + int sx,sy,osa_samp; }; /** @@ -62,17 +64,8 @@ void resetBuffer(Float *abuffer, int &aw, int &ah) { buffer = abuffer; w = aw; h = ah; }; virtual void init() = 0; virtual int initSampleSet() = 0; - virtual Sample *nextSample() = 0; - virtual void saveSample(Sample *samp, Colour &col) = 0; -}; - -/** - * default sample - */ -class DefaultSample: public Sample -{ - friend class DefaultSampler; - int sx,sy,osa_samp; + virtual bool nextSample(Sample *s) = 0; + virtual void saveSample(Sample &samp, Colour &col) = 0; }; /** @@ -90,8 +83,8 @@ Sampler(abuffer, aw, ah), phase(-1), subsample(8), oversample(0) {}; void init(); int initSampleSet(); - Sample *nextSample(); - void saveSample(Sample *samp, Colour &col); + bool nextSample(Sample *s); + void saveSample(Sample &samp, Colour &col); void setSubsample(int sub) { subsample = sub; }; int getSubsample() { return subsample; };