Definition at line 35 of file photonmap.cpp.
PhotonIntegrator::PhotonIntegrator | ( | int | ncaus, | |
int | ndir, | |||
int | nindir, | |||
int | nLookup, | |||
int | mdepth, | |||
float | maxdist, | |||
bool | finalGather, | |||
int | gatherSamples, | |||
bool | directWithPhotons | |||
) |
Definition at line 105 of file photonmap.cpp.
References causticMap, directMap, directWithPhotons, finalGather, gatherSamples, indirectMap, maxDistSquared, maxSpecularDepth, nCausticPhotons, nDirectPhotons, nIndirectPhotons, nLookup, and specularDepth.
PhotonIntegrator::~PhotonIntegrator | ( | ) |
Spectrum PhotonIntegrator::Li | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
float * | alpha | |||
) | const [virtual] |
Implements Integrator.
Definition at line 299 of file photonmap.cpp.
References AbsDot(), Spectrum::Black(), BSDF_ALL, BSDF_REFLECTION, BSDF_SPECULAR, BSDF_TRANSMISSION, bsdfComponentOffset, bsdfSampleOffset, causticMap, Ray::d, Intersection::dg, BSDF::dgShading, directMap, directWithPhotons, DifferentialGeometry::dndu, DifferentialGeometry::dndv, Dot(), DifferentialGeometry::dpdx, DifferentialGeometry::dpdy, DifferentialGeometry::dudx, DifferentialGeometry::dudy, DifferentialGeometry::dvdx, DifferentialGeometry::dvdy, BSDF::eta, finalGather, gatherComponentOffset, gatherSampleOffset, gatherSamples, Intersection::GetBSDF(), RayDifferential::hasDifferentials, indirectMap, Scene::Intersect(), Intersection::Le(), Scene::Li(), Scene::lights, lightSampleOffset, LPhoton(), maxDistSquared, maxSpecularDepth, nCausticPaths, nDirectPaths, nIndirectPaths, nLookup, DifferentialGeometry::nn, Ray::o, Sample::oneD, DifferentialGeometry::p, RayDifferential::rx, RayDifferential::ry, BSDF::Sample_f(), specularDepth, Scene::Transmittance(), Sample::twoD, and UniformSampleAllLights().
Reimplemented from Integrator.
Definition at line 125 of file photonmap.cpp.
References Sample::Add1D(), Sample::Add2D(), bsdfComponentOffset, bsdfSampleOffset, finalGather, gatherComponentOffset, gatherSampleOffset, gatherSamples, lightNumOffset, Scene::lights, lightSampleOffset, Light::nSamples, Sampler::RoundSize(), and Scene::sampler.
void PhotonIntegrator::Preprocess | ( | const Scene * | scene | ) | [virtual] |
Reimplemented from Integrator.
Definition at line 147 of file photonmap.cpp.
References AbsDot(), Spectrum::Black(), BSDF_ALL, BSDF_REFLECTION, BSDF_SPECULAR, BSDF_TRANSMISSION, causticMap, Ray::d, Intersection::dg, BSDF::dgShading, directMap, ProgressReporter::Done(), Error(), Floor2Int(), BSDF::FreeAll(), Intersection::GetBSDF(), indirectMap, Scene::Intersect(), Scene::lights, nCausticPaths, nCausticPhotons, nDirectPaths, nDirectPhotons, nIndirectPaths, nIndirectPhotons, DifferentialGeometry::nn, BSDF::NumComponents(), DifferentialGeometry::p, RadicalInverse(), RandomFloat(), BSDF::Sample_f(), Light::Sample_L(), Scene::Transmittance(), unsuccessful(), and ProgressReporter::Update().
static bool PhotonIntegrator::unsuccessful | ( | int | needed, | |
int | found, | |||
int | shot | |||
) | [inline, static, private] |
Spectrum PhotonIntegrator::LPhoton | ( | KdTree< Photon, PhotonProcess > * | map, | |
int | nPaths, | |||
int | nLookup, | |||
BSDF * | bsdf, | |||
const Intersection & | isect, | |||
const Vector & | w, | |||
float | maxDistSquared | |||
) | [static, private] |
Definition at line 433 of file photonmap.cpp.
References StatsRatio::Add(), Photon::alpha, BSDF_ALL_REFLECTION, BSDF_ALL_TRANSMISSION, BSDF_DIFFUSE, BSDF_GLOSSY, BSDF_REFLECTION, BSDF_TRANSMISSION, Intersection::dg, BSDF::dgShading, Dot(), BSDF::f(), PhotonProcess::foundPhotons, INV_PI, KdTree< NodeData, LookupProc >::Lookup(), M_PI, DifferentialGeometry::nn, BSDF::NumComponents(), DifferentialGeometry::p, ClosePhoton::photon, PhotonProcess::photons, and BSDF::rho().
Referenced by Li().
u_int PhotonIntegrator::nCausticPhotons [private] |
u_int PhotonIntegrator::nIndirectPhotons [private] |
u_int PhotonIntegrator::nDirectPhotons [private] |
u_int PhotonIntegrator::nLookup [private] |
int PhotonIntegrator::specularDepth [mutable, private] |
int PhotonIntegrator::maxSpecularDepth [private] |
float PhotonIntegrator::maxDistSquared [private] |
bool PhotonIntegrator::directWithPhotons [private] |
bool PhotonIntegrator::finalGather [private] |
Definition at line 61 of file photonmap.cpp.
Referenced by Li(), PhotonIntegrator(), and RequestSamples().
int PhotonIntegrator::gatherSamples [private] |
Definition at line 62 of file photonmap.cpp.
Referenced by Li(), PhotonIntegrator(), and RequestSamples().
int* PhotonIntegrator::lightSampleOffset [private] |
int PhotonIntegrator::lightNumOffset [private] |
int* PhotonIntegrator::bsdfSampleOffset [private] |
int * PhotonIntegrator::bsdfComponentOffset [private] |
int PhotonIntegrator::gatherSampleOffset [private] |
int PhotonIntegrator::gatherComponentOffset [private] |
int PhotonIntegrator::nCausticPaths [private] |
int PhotonIntegrator::nDirectPaths [private] |
int PhotonIntegrator::nIndirectPaths [private] |
KdTree<Photon, PhotonProcess>* PhotonIntegrator::causticMap [mutable, private] |
Definition at line 68 of file photonmap.cpp.
Referenced by Li(), PhotonIntegrator(), Preprocess(), and ~PhotonIntegrator().
KdTree<Photon, PhotonProcess>* PhotonIntegrator::directMap [mutable, private] |
Definition at line 69 of file photonmap.cpp.
Referenced by Li(), PhotonIntegrator(), Preprocess(), and ~PhotonIntegrator().
KdTree<Photon, PhotonProcess>* PhotonIntegrator::indirectMap [mutable, private] |
Definition at line 70 of file photonmap.cpp.
Referenced by Li(), PhotonIntegrator(), Preprocess(), and ~PhotonIntegrator().