00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if defined(_MSC_VER)
00025 #pragma once
00026 #endif
00027
00028 #ifndef PBRT_SAMPLERS_LOWDISCREPANCY_H
00029 #define PBRT_SAMPLERS_LOWDISCREPANCY_H
00030
00031
00032 #include "sampler.h"
00033 #include "paramset.h"
00034 #include "film.h"
00035 #include "parallel.h"
00036
00037
00038 class LDSampler : public Sampler {
00039 public:
00040
00041 LDSampler(int xstart, int xend, int ystart, int yend,
00042 int nsamp, float sopen, float sclose);
00043 ~LDSampler();
00044 Sampler *GetSubSampler(int num, int count);
00045 int RoundSize(int size) const { return RoundUpPow2(size); }
00046 int GetMoreSamples(Sample *sample, RNG &rng);
00047 int MaximumSampleCount() { return nPixelSamples; }
00048 private:
00049
00050 int xPos, yPos, nPixelSamples;
00051 float *sampleBuf;
00052 };
00053
00054
00055 LDSampler *CreateLowDiscrepancySampler(const ParamSet ¶ms, const Film *film,
00056 const Camera *camera);
00057
00058 #endif // PBRT_SAMPLERS_LOWDISCREPANCY_H