#include <metrosampler.h>
Public Member Functions | |
MetropolisSampler (int xStart, int xEnd, int yStart, int yEnd, int maxRej, float largeProb, float rng, int sw, bool useV) | |
~MetropolisSampler () | |
virtual MetropolisSampler * | clone () const |
u_int | GetTotalSamplePos () |
int | RoundSize (int size) const |
bool | GetNextSample (Sample *sample, u_int *use_pos) |
float * | GetLazyValues (Sample *sample, u_int num, u_int pos) |
void | AddSample (float imageX, float imageY, const Sample &sample, const Ray &ray, const XYZColor &L, float alpha, int id=0) |
void | AddSample (const Sample &sample) |
void | GetBufferType (BufferType *t) |
Static Public Member Functions | |
static Sampler * | CreateSampler (const ParamSet ¶ms, const Film *film) |
Public Attributes | |
bool | large |
float | LY |
float | V |
int | normalSamples |
int | totalSamples |
int | totalTimes |
int | maxRejects |
int | consecRejects |
int | stamp |
float | pLarge |
float | range |
float | weight |
float | alpha |
float * | sampleImage |
int * | timeImage |
int * | offset |
vector< Sample::Contribution > | oldContributions |
float * | strataSamples |
int | strataWidth |
int | strataSqr |
int | currentStrata |
bool | useVariance |
Static Public Attributes | |
static int | initCount |
static int | initSamples |
static float | meanIntensity |
Definition at line 35 of file metrosampler.h.
MetropolisSampler::MetropolisSampler | ( | int | xStart, | |
int | xEnd, | |||
int | yStart, | |||
int | yEnd, | |||
int | maxRej, | |||
float | largeProb, | |||
float | rng, | |||
int | sw, | |||
bool | useV | |||
) |
Definition at line 70 of file metrosampler.cpp.
References lux::AllocAligned(), currentStrata, strataSamples, and strataSqr.
Referenced by clone(), and CreateSampler().
MetropolisSampler::~MetropolisSampler | ( | ) |
Definition at line 83 of file metrosampler.cpp.
References lux::FreeAligned(), sampleImage, and strataSamples.
void MetropolisSampler::AddSample | ( | const Sample & | sample | ) | [virtual] |
Reimplemented from lux::Sampler.
Definition at line 207 of file metrosampler.cpp.
References lux::Film::AddSample(), lux::Film::AddSampleCount(), alpha, consecRejects, lux::Sample::contributions, lux::Sampler::film, lux::random::floatValue(), lux::Sample::imageX, lux::Sample::imageY, initCount, initSamples, large, lux::Sample::lensU, lux::Sample::lensV, LY, maxRejects, meanIntensity, cimg_library::cimg::min(), oldContributions, lux::Sample::oneD, pLarge, SAMPLE_FLOATS, sampleImage, lux::Sample::singleWavelength, lux::Sample::stamp, stamp, lux::Sample::time, timeImage, lux::Sample::timexD, totalSamples, totalTimes, useVariance, V, lux::Sample::wavelengths, and weight.
void MetropolisSampler::AddSample | ( | float | imageX, | |
float | imageY, | |||
const Sample & | sample, | |||
const Ray & | ray, | |||
const XYZColor & | L, | |||
float | alpha, | |||
int | id = 0 | |||
) |
Definition at line 197 of file metrosampler.cpp.
References lux::Sample::AddContribution(), lux::Sample::contributions, and lux::Sampler::isSampleEnd.
MetropolisSampler * MetropolisSampler::clone | ( | ) | const [virtual] |
Implements lux::Sampler.
Definition at line 89 of file metrosampler.cpp.
References MetropolisSampler(), sampleImage, and totalSamples.
Definition at line 288 of file metrosampler.cpp.
References lux::ParamSet::FindOneBool(), lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOneInt(), lux::Film::GetSampleExtent(), initCount, initSamples, meanIntensity, MetropolisSampler(), range, and useVariance.
void lux::MetropolisSampler::GetBufferType | ( | BufferType * | t | ) | [inline, virtual] |
Reimplemented from lux::Sampler.
Definition at line 49 of file metrosampler.h.
References lux::BUF_TYPE_PER_SCREEN.
Reimplemented from lux::Sampler.
Definition at line 174 of file metrosampler.cpp.
References lux::Sample::dxD, lux::random::floatValue(), mutate(), offset, sampleImage, lux::Sample::stamp, lux::Sample::timexD, and lux::Sample::xD.
Implements lux::Sampler.
Definition at line 119 of file metrosampler.cpp.
References currentStrata, lux::Film::enoughSamplePerPixel, lux::Sampler::film, lux::random::floatValue(), lux::Film::haltSamplePerPixel, lux::Sample::imageX, lux::Sample::imageY, initCount, initMetropolis(), initSamples, large, lux::Sample::lensU, lux::Sample::lensV, mutate(), mutateScaled(), normalSamples, lux::Sample::oneD, pLarge, range, SAMPLE_FLOATS, sampleImage, lux::Sample::sampler, lux::Shuffle(), lux::Sample::singleWavelength, lux::Sample::stamp, strataSamples, strataSqr, strataWidth, lux::StratifiedSample2D(), lux::Sample::time, lux::Sample::timexD, totalTimes, lux::Sample::wavelengths, lux::Sampler::xPixelEnd, lux::Sampler::xPixelStart, lux::Sampler::yPixelEnd, and lux::Sampler::yPixelStart.
u_int lux::MetropolisSampler::GetTotalSamplePos | ( | ) | [inline, virtual] |
Implements lux::Sampler.
Definition at line 42 of file metrosampler.h.
int lux::MetropolisSampler::RoundSize | ( | int | size | ) | const [inline, virtual] |
Implements lux::Sampler.
Definition at line 43 of file metrosampler.h.
Definition at line 54 of file metrosampler.h.
Referenced by AddSample().
Definition at line 53 of file metrosampler.h.
Referenced by AddSample().
Definition at line 61 of file metrosampler.h.
Referenced by GetNextSample(), and MetropolisSampler().
int MetropolisSampler::initCount [static] |
Definition at line 57 of file metrosampler.h.
Referenced by AddSample(), CreateSampler(), and GetNextSample().
int MetropolisSampler::initSamples [static] |
Definition at line 57 of file metrosampler.h.
Referenced by AddSample(), CreateSampler(), and GetNextSample().
Definition at line 51 of file metrosampler.h.
Referenced by AddSample(), and GetNextSample().
Definition at line 52 of file metrosampler.h.
Referenced by AddSample().
Definition at line 53 of file metrosampler.h.
Referenced by AddSample().
float MetropolisSampler::meanIntensity [static] |
Definition at line 58 of file metrosampler.h.
Referenced by AddSample(), and CreateSampler().
Definition at line 53 of file metrosampler.h.
Referenced by GetNextSample(), and initMetropolis().
Definition at line 56 of file metrosampler.h.
Referenced by GetLazyValues(), and initMetropolis().
Definition at line 59 of file metrosampler.h.
Referenced by AddSample().
Definition at line 54 of file metrosampler.h.
Referenced by AddSample(), and GetNextSample().
Definition at line 54 of file metrosampler.h.
Referenced by CreateSampler(), and GetNextSample().
Definition at line 55 of file metrosampler.h.
Referenced by AddSample(), clone(), GetLazyValues(), GetNextSample(), initMetropolis(), and ~MetropolisSampler().
Definition at line 53 of file metrosampler.h.
Referenced by AddSample().
Definition at line 60 of file metrosampler.h.
Referenced by GetNextSample(), MetropolisSampler(), and ~MetropolisSampler().
Definition at line 61 of file metrosampler.h.
Referenced by GetNextSample(), and MetropolisSampler().
Definition at line 61 of file metrosampler.h.
Referenced by GetNextSample().
Definition at line 56 of file metrosampler.h.
Referenced by AddSample(), and initMetropolis().
Definition at line 53 of file metrosampler.h.
Referenced by AddSample(), clone(), and initMetropolis().
Definition at line 53 of file metrosampler.h.
Referenced by AddSample(), GetNextSample(), and initMetropolis().
Definition at line 62 of file metrosampler.h.
Referenced by AddSample(), and CreateSampler().
Definition at line 52 of file metrosampler.h.
Referenced by AddSample().
Definition at line 54 of file metrosampler.h.
Referenced by AddSample().