#include "stdafx.h"#include "montecarlo.h"#include "geometry.h"#include "shape.h"#include "volume.h"Go to the source code of this file.
Functions | |
| void | StratifiedSample1D (float *samp, int nSamples, RNG &rng, bool jitter) |
| void | StratifiedSample2D (float *samp, int nx, int ny, RNG &rng, bool jitter) |
| void | LatinHypercube (float *samples, uint32_t nSamples, uint32_t nDim, RNG &rng) |
| int | LDPixelSampleFloatsNeeded (const Sample *sample, int nPixelSamples) |
| void | LDPixelSample (int xPos, int yPos, float shutterOpen, float shutterClose, int nPixelSamples, Sample *samples, float *buf, RNG &rng) |
| void | RejectionSampleDisk (float *x, float *y, RNG &rng) |
| Vector | UniformSampleHemisphere (float u1, float u2) |
| float | UniformHemispherePdf () |
| Vector | UniformSampleSphere (float u1, float u2) |
| float | UniformSpherePdf () |
| void | UniformSampleDisk (float u1, float u2, float *x, float *y) |
| void | ConcentricSampleDisk (float u1, float u2, float *dx, float *dy) |
| void | UniformSampleTriangle (float u1, float u2, float *u, float *v) |
| float | UniformConePdf (float cosThetaMax) |
| Vector | UniformSampleCone (float u1, float u2, float costhetamax) |
| Vector | UniformSampleCone (float u1, float u2, float costhetamax, const Vector &x, const Vector &y, const Vector &z) |
| Vector | SampleHG (const Vector &w, float g, float u1, float u2) |
| float | HGPdf (const Vector &w, const Vector &wp, float g) |
Variables | |
| static const int | primes [] |
| void ConcentricSampleDisk | ( | float | u1, | |
| float | u2, | |||
| float * | dx, | |||
| float * | dy | |||
| ) |
Definition at line 298 of file montecarlo.cpp.
References M_PI.
Referenced by CosineSampleHemisphere(), PerspectiveCamera::GenerateRay(), OrthoCamera::GenerateRay(), PerspectiveCamera::GenerateRayDifferential(), OrthoCamera::GenerateRayDifferential(), Disk::Sample(), InfiniteAreaLight::Sample_L(), and DistantLight::Sample_L().
Definition at line 432 of file montecarlo.cpp.
References PhaseHG().
| void LatinHypercube | ( | float * | samples, | |
| uint32_t | nSamples, | |||
| uint32_t | nDim, | |||
| RNG & | rng | |||
| ) |
Definition at line 163 of file montecarlo.cpp.
References OneMinusEpsilon, RNG::RandomFloat(), and RNG::RandomUInt().
Referenced by StratifiedSampler::GetMoreSamples(), and HaltonSampler::GetMoreSamples().
| void LDPixelSample | ( | int | xPos, | |
| int | yPos, | |||
| float | shutterOpen, | |||
| float | shutterClose, | |||
| int | nPixelSamples, | |||
| Sample * | samples, | |||
| float * | buf, | |||
| RNG & | rng | |||
| ) |
Definition at line 192 of file montecarlo.cpp.
References ALLOCA, CameraSample::imageX, CameraSample::imageY, LDShuffleScrambled1D(), LDShuffleScrambled2D(), CameraSample::lensU, CameraSample::lensV, Lerp(), Sample::n1D, Sample::n2D, and CameraSample::time.
Referenced by LDSampler::GetMoreSamples(), and AdaptiveSampler::GetMoreSamples().
| int LDPixelSampleFloatsNeeded | ( | const Sample * | sample, | |
| int | nPixelSamples | |||
| ) |
Definition at line 182 of file montecarlo.cpp.
References Sample::n1D, and Sample::n2D.
Referenced by LDSampler::GetMoreSamples(), and AdaptiveSampler::GetMoreSamples().
| void RejectionSampleDisk | ( | float * | x, | |
| float * | y, | |||
| RNG & | rng | |||
| ) |
Definition at line 249 of file montecarlo.cpp.
References RNG::RandomFloat().
Definition at line 415 of file montecarlo.cpp.
References CoordinateSystem(), M_PI, and SphericalDirection().
| void StratifiedSample1D | ( | float * | samp, | |
| int | nSamples, | |||
| RNG & | rng, | |||
| bool | jitter | |||
| ) |
Definition at line 140 of file montecarlo.cpp.
References OneMinusEpsilon, and RNG::RandomFloat().
Referenced by StratifiedSampler::GetMoreSamples().
| void StratifiedSample2D | ( | float * | samp, | |
| int | nx, | |||
| int | ny, | |||
| RNG & | rng, | |||
| bool | jitter | |||
| ) |
Definition at line 150 of file montecarlo.cpp.
References OneMinusEpsilon, and RNG::RandomFloat().
Referenced by StratifiedSampler::GetMoreSamples(), and BSDF::rho().
| float UniformConePdf | ( | float | cosThetaMax | ) |
Definition at line 392 of file montecarlo.cpp.
References M_PI.
Referenced by PhotonIntegrator::Li(), Sphere::Pdf(), SpotLight::Sample_L(), and ProjectionLight::Sample_L().
| float UniformHemispherePdf | ( | ) |
Definition at line 270 of file montecarlo.cpp.
References INV_TWOPI.
Referenced by Gen_UniformHemisphere().
| Vector UniformSampleCone | ( | float | u1, | |
| float | u2, | |||
| float | costhetamax, | |||
| const Vector & | x, | |||
| const Vector & | y, | |||
| const Vector & | z | |||
| ) |
Definition at line 405 of file montecarlo.cpp.
| Vector UniformSampleCone | ( | float | u1, | |
| float | u2, | |||
| float | costhetamax | |||
| ) |
Definition at line 397 of file montecarlo.cpp.
References M_PI.
Referenced by PhotonIntegrator::Li(), Sphere::Sample(), SpotLight::Sample_L(), and ProjectionLight::Sample_L().
| void UniformSampleDisk | ( | float | u1, | |
| float | u2, | |||
| float * | x, | |||
| float * | y | |||
| ) |
Definition at line 290 of file montecarlo.cpp.
References M_PI.
| Vector UniformSampleHemisphere | ( | float | u1, | |
| float | u2 | |||
| ) |
Definition at line 260 of file montecarlo.cpp.
References M_PI.
Referenced by Gen_UniformHemisphere(), and BxDF::rho().
| Vector UniformSampleSphere | ( | float | u1, | |
| float | u2 | |||
| ) |
Definition at line 275 of file montecarlo.cpp.
References M_PI.
Referenced by AmbientOcclusionIntegrator::Li(), CreateRadianceProbes::Render(), AggregateTest::Render(), SurfacePointTask::Run(), Sphere::Sample(), PointLight::Sample_L(), GonioPhotometricLight::Sample_L(), DiffuseAreaLight::Sample_L(), SHComputeBSDFMatrix(), SHComputeDiffuseTransfer(), SHComputeTransferMatrix(), and SHProjectIncidentIndirectRadiance().
| void UniformSampleTriangle | ( | float | u1, | |
| float | u2, | |||
| float * | u, | |||
| float * | v | |||
| ) |
Definition at line 343 of file montecarlo.cpp.
Referenced by Triangle::Sample().
| float UniformSpherePdf | ( | ) |
Definition at line 285 of file montecarlo.cpp.
References M_PI.
Referenced by PointLight::Sample_L(), GonioPhotometricLight::Sample_L(), SHComputeBSDFMatrix(), SHComputeDiffuseTransfer(), SHComputeTransferMatrix(), and SHProjectIncidentIndirectRadiance().
const int primes[] [static] |
Definition at line 33 of file montecarlo.cpp.
Referenced by PermutedHalton::PermutedHalton().
1.6.3