#include <rng.h>
Public Member Functions | |
RNG (uint32_t seed=5489UL) | |
void | Seed (uint32_t seed) const |
float | RandomFloat () const |
unsigned long | RandomUInt () const |
Private Attributes | |
unsigned long | mt [N] |
int | mti |
Static Private Attributes | |
static const int | N = 624 |
Definition at line 36 of file rng.h.
RNG::RNG | ( | uint32_t | seed = 5489UL |
) | [inline] |
float RNG::RandomFloat | ( | ) | const |
Definition at line 51 of file rng.cpp.
References RandomUInt().
Referenced by BestCandidateSampler::BestCandidateSampler(), BSDFSample::BSDFSample(), Gen_CosHemisphere(), Gen_UniformHemisphere(), RandomSampler::GetMoreSamples(), BestCandidateSampler::GetMoreSamples(), LargeStep(), LatinHypercube(), SingleScatteringIntegrator::Li(), PathIntegrator::Li(), IGIIntegrator::Li(), EmissionIntegrator::Li(), LightSample::LightSample(), mutate(), IrradianceCacheIntegrator::pathL(), IGIIntegrator::Preprocess(), RandomSampler::RandomSampler(), RejectionSampleDisk(), MetropolisRenderer::Render(), CreateRadianceProbes::Render(), AggregateTest::Render(), SurfacePointTask::Run(), PhotonShootingTask::Run(), MLTTask::Run(), SHProjectIncidentIndirectRadiance(), StratifiedSample1D(), StratifiedSample2D(), SingleScatteringIntegrator::Transmittance(), EmissionIntegrator::Transmittance(), and UniformSampleOneLight().
unsigned long RNG::RandomUInt | ( | ) | const |
Definition at line 62 of file rng.cpp.
References LOWER_MASK, M, MATRIX_A, mt, mti, N, Seed(), and UPPER_MASK.
Referenced by IrradianceCacheIntegrator::indirectLo(), LatinHypercube(), LDShuffleScrambled1D(), LDShuffleScrambled2D(), AmbientOcclusionIntegrator::Li(), DipoleSubsurfaceIntegrator::Preprocess(), RandomFloat(), MetropolisRenderer::Render(), AggregateTest::Render(), SHComputeBSDFMatrix(), SHComputeDiffuseTransfer(), SHComputeTransferMatrix(), Light::SHProject(), SHProjectIncidentIndirectRadiance(), and Shuffle().
void RNG::Seed | ( | uint32_t | seed | ) | const |
Definition at line 35 of file rng.cpp.
Referenced by RandomUInt(), MetropolisRenderer::Render(), and RNG().
Definition at line 49 of file rng.h.
Referenced by RandomUInt(), and Seed().
int RNG::mti [mutable, private] |
Definition at line 50 of file rng.h.
Referenced by RandomUInt(), RNG(), and Seed().
const int RNG::N = 624 [static, private] |
Definition at line 48 of file rng.h.
Referenced by RandomUInt(), RNG(), and Seed().