#include <adaptive.h>
Public Member Functions | |
AdaptiveSampler (int xstart, int xend, int ystart, int yend, int minSamples, int maxSamples, const string &method, float sopen, float sclose) | |
Sampler * | GetSubSampler (int num, int count) |
~AdaptiveSampler () | |
int | RoundSize (int size) const |
int | MaximumSampleCount () |
int | GetMoreSamples (Sample *sample, RNG &rng) |
bool | ReportResults (Sample *samples, const RayDifferential *rays, const Spectrum *Ls, const Intersection *isects, int count) |
Private Types | |
enum | AdaptiveTest { ADAPTIVE_COMPARE_SHAPE_ID, ADAPTIVE_CONTRAST_THRESHOLD } |
Private Member Functions | |
bool | needsSupersampling (Sample *samples, const RayDifferential *rays, const Spectrum *Ls, const Intersection *isects, int count) |
Private Attributes | |
int | xPos |
int | yPos |
int | minSamples |
int | maxSamples |
float * | sampleBuf |
AdaptiveTest | method |
bool | supersamplePixel |
Definition at line 36 of file adaptive.h.
enum AdaptiveSampler::AdaptiveTest [private] |
Definition at line 60 of file adaptive.h.
AdaptiveSampler::AdaptiveSampler | ( | int | xstart, | |
int | xend, | |||
int | ystart, | |||
int | yend, | |||
int | minSamples, | |||
int | maxSamples, | |||
const string & | method, | |||
float | sopen, | |||
float | sclose | |||
) |
Definition at line 36 of file adaptive.cpp.
References ADAPTIVE_COMPARE_SHAPE_ID, ADAPTIVE_CONTRAST_THRESHOLD, IsPowerOf2(), maxSamples, method, minSamples, RoundUpPow2(), sampleBuf, supersamplePixel, Warning(), Sampler::xPixelStart, xPos, Sampler::yPixelStart, and yPos.
Referenced by GetSubSampler().
AdaptiveSampler::~AdaptiveSampler | ( | ) |
Definition at line 79 of file adaptive.cpp.
References sampleBuf.
Implements Sampler.
Definition at line 94 of file adaptive.cpp.
References LDPixelSample(), LDPixelSampleFloatsNeeded(), maxSamples, minSamples, sampleBuf, Sampler::shutterClose, Sampler::shutterOpen, supersamplePixel, xPos, Sampler::yPixelEnd, and yPos.
Sampler * AdaptiveSampler::GetSubSampler | ( | int | num, | |
int | count | |||
) | [virtual] |
Implements Sampler.
Definition at line 84 of file adaptive.cpp.
References ADAPTIVE_CONTRAST_THRESHOLD, AdaptiveSampler(), Sampler::ComputeSubWindow(), maxSamples, method, minSamples, Sampler::shutterClose, and Sampler::shutterOpen.
int AdaptiveSampler::MaximumSampleCount | ( | ) | [inline, virtual] |
Implements Sampler.
Definition at line 47 of file adaptive.h.
bool AdaptiveSampler::needsSupersampling | ( | Sample * | samples, | |
const RayDifferential * | rays, | |||
const Spectrum * | Ls, | |||
const Intersection * | isects, | |||
int | count | |||
) | [private] |
Definition at line 142 of file adaptive.cpp.
References ADAPTIVE_COMPARE_SHAPE_ID, ADAPTIVE_CONTRAST_THRESHOLD, and method.
Referenced by ReportResults().
bool AdaptiveSampler::ReportResults | ( | Sample * | samples, | |
const RayDifferential * | rays, | |||
const Spectrum * | Ls, | |||
const Intersection * | isects, | |||
int | count | |||
) | [virtual] |
Reimplemented from Sampler.
Definition at line 112 of file adaptive.cpp.
References needsSupersampling(), supersamplePixel, Sampler::xPixelEnd, Sampler::xPixelStart, xPos, and yPos.
int AdaptiveSampler::RoundSize | ( | int | size | ) | const [inline, virtual] |
int AdaptiveSampler::maxSamples [private] |
Definition at line 58 of file adaptive.h.
Referenced by AdaptiveSampler(), GetMoreSamples(), and GetSubSampler().
AdaptiveTest AdaptiveSampler::method [private] |
Definition at line 62 of file adaptive.h.
Referenced by AdaptiveSampler(), GetSubSampler(), and needsSupersampling().
int AdaptiveSampler::minSamples [private] |
Definition at line 58 of file adaptive.h.
Referenced by AdaptiveSampler(), GetMoreSamples(), and GetSubSampler().
float* AdaptiveSampler::sampleBuf [private] |
Definition at line 59 of file adaptive.h.
Referenced by AdaptiveSampler(), GetMoreSamples(), and ~AdaptiveSampler().
bool AdaptiveSampler::supersamplePixel [private] |
Definition at line 63 of file adaptive.h.
Referenced by AdaptiveSampler(), GetMoreSamples(), and ReportResults().
int AdaptiveSampler::xPos [private] |
Definition at line 57 of file adaptive.h.
Referenced by AdaptiveSampler(), GetMoreSamples(), and ReportResults().
int AdaptiveSampler::yPos [private] |
Definition at line 57 of file adaptive.h.
Referenced by AdaptiveSampler(), GetMoreSamples(), and ReportResults().