#include <photonmap.h>
Definition at line 45 of file photonmap.h.
PhotonIntegrator::PhotonIntegrator | ( | int | ncaus, | |
int | ndir, | |||
int | nindir, | |||
int | nLookup, | |||
int | mdepth, | |||
float | maxdist, | |||
bool | finalGather, | |||
int | gatherSamples, | |||
bool | directWithPhotons | |||
) |
Definition at line 34 of file photonmap.cpp.
References causticMap, directMap, directWithPhotons, finalGather, gatherSamples, indirectMap, maxDistSquared, maxSpecularDepth, nCausticPhotons, nDirectPhotons, nIndirectPhotons, nLookup, and specularDepth.
Referenced by clone(), and CreateSurfaceIntegrator().
PhotonIntegrator::~PhotonIntegrator | ( | ) |
Definition at line 49 of file photonmap.cpp.
References causticMap, directMap, and indirectMap.
PhotonIntegrator * PhotonIntegrator::clone | ( | ) | const [virtual] |
Definition at line 29 of file photonmap.cpp.
References PhotonIntegrator().
SurfaceIntegrator * PhotonIntegrator::CreateSurfaceIntegrator | ( | const ParamSet & | params | ) | [static] |
Definition at line 439 of file photonmap.cpp.
References finalGather, lux::ParamSet::FindOneBool(), lux::ParamSet::FindOneFloat(), lux::ParamSet::FindOneInt(), gatherSamples, and PhotonIntegrator().
IntegrationSampler* lux::PhotonIntegrator::HasIntegrationSampler | ( | IntegrationSampler * | is | ) | [inline] |
Definition at line 57 of file photonmap.h.
Spectrum PhotonIntegrator::Li | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
float * | alpha | |||
) | const [virtual] |
Implements lux::Integrator.
Definition at line 228 of file photonmap.cpp.
References lux::AbsDot(), lux::Spectrum::Black(), lux::BSDF_ALL, lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, bsdfComponentOffset, bsdfSampleOffset, causticMap, lux::Ray::d, lux::Intersection::dg, lux::BSDF::dgShading, directMap, directWithPhotons, lux::DifferentialGeometry::dndu, lux::DifferentialGeometry::dndv, lux::Dot(), lux::DifferentialGeometry::dpdx, lux::DifferentialGeometry::dpdy, lux::DifferentialGeometry::dudx, lux::DifferentialGeometry::dudy, lux::DifferentialGeometry::dvdx, lux::DifferentialGeometry::dvdy, lux::BSDF::eta, finalGather, gatherComponentOffset, gatherSampleOffset, gatherSamples, lux::Intersection::GetBSDF(), lux::RayDifferential::hasDifferentials, indirectMap, lux::Scene::Intersect(), lux::Intersection::Le(), lux::Scene::Li(), lux::Scene::lights, lightSampleOffset, LPhoton(), maxDistSquared, maxSpecularDepth, nCausticPaths, nDirectPaths, nIndirectPaths, nLookup, lux::DifferentialGeometry::nn, lux::Ray::o, lux::Sample::oneD, lux::DifferentialGeometry::p, blender::p, lux::RayDifferential::rx, lux::RayDifferential::ry, lux::BSDF::Sample_f(), specularDepth, lux::Scene::Transmittance(), lux::Sample::twoD, and lux::UniformSampleAllLights().
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 361 of file photonmap.cpp.
References lux::Photon::alpha, lux::BSDF_ALL_REFLECTION, lux::BSDF_ALL_TRANSMISSION, lux::BSDF_DIFFUSE, lux::BSDF_GLOSSY, lux::BSDF_REFLECTION, lux::BSDF_TRANSMISSION, lux::Intersection::dg, lux::BSDF::dgShading, lux::Dot(), lux::BSDF::f(), lux::PhotonProcess::foundPhotons, INV_PI, lux::KdTree< NodeData, LookupProc >::Lookup(), M_PI, lux::DifferentialGeometry::nn, lux::BSDF::NumComponents(), lux::DifferentialGeometry::p, lux::ClosePhoton::photon, lux::PhotonProcess::photons, and lux::BSDF::rho().
Referenced by Li().
void PhotonIntegrator::Preprocess | ( | const Scene * | scene | ) | [virtual] |
Reimplemented from lux::Integrator.
Definition at line 76 of file photonmap.cpp.
References lux::AbsDot(), lux::Spectrum::Black(), lux::BSDF_ALL, lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, causticMap, lux::Ray::d, lux::Intersection::dg, lux::BSDF::dgShading, directMap, ProgressReporter::Done(), lux::random::floatValue(), Floor2Int(), lux::Intersection::GetBSDF(), indirectMap, lux::Scene::Intersect(), lux::Scene::lights, LUX_CONSISTENCY, LUX_ERROR, luxError, cimg_library::cimg::min(), nCausticPaths, nCausticPhotons, nDirectPaths, nDirectPhotons, nIndirectPaths, nIndirectPhotons, lux::DifferentialGeometry::nn, lux::BSDF::NumComponents(), lux::DifferentialGeometry::p, lux::RadicalInverse(), lux::BSDF::Sample_f(), lux::Light::Sample_L(), lux::Scene::Transmittance(), unsuccessful(), and ProgressReporter::Update().
Reimplemented from lux::Integrator.
Definition at line 54 of file photonmap.cpp.
References lux::Sample::Add1D(), lux::Sample::Add2D(), bsdfComponentOffset, bsdfSampleOffset, finalGather, gatherComponentOffset, gatherSampleOffset, gatherSamples, lightNumOffset, lux::Scene::lights, lightSampleOffset, lux::Light::nSamples, lux::Sampler::RoundSize(), and lux::Scene::sampler.
static bool lux::PhotonIntegrator::unsuccessful | ( | int | needed, | |
int | found, | |||
int | shot | |||
) | [inline, static, private] |
Definition at line 61 of file photonmap.h.
Referenced by Preprocess().
int * lux::PhotonIntegrator::bsdfComponentOffset [private] |
Definition at line 78 of file photonmap.h.
Referenced by Li(), and RequestSamples().
int* lux::PhotonIntegrator::bsdfSampleOffset [private] |
Definition at line 78 of file photonmap.h.
Referenced by Li(), and RequestSamples().
KdTree<Photon, PhotonProcess>* lux::PhotonIntegrator::causticMap [mutable, private] |
Definition at line 81 of file photonmap.h.
Referenced by Li(), PhotonIntegrator(), Preprocess(), and ~PhotonIntegrator().
KdTree<Photon, PhotonProcess>* lux::PhotonIntegrator::directMap [mutable, private] |
Definition at line 82 of file photonmap.h.
Referenced by Li(), PhotonIntegrator(), Preprocess(), and ~PhotonIntegrator().
bool lux::PhotonIntegrator::directWithPhotons [private] |
Definition at line 74 of file photonmap.h.
Referenced by Li(), and PhotonIntegrator().
bool lux::PhotonIntegrator::finalGather [private] |
Definition at line 74 of file photonmap.h.
Referenced by CreateSurfaceIntegrator(), Li(), PhotonIntegrator(), and RequestSamples().
int lux::PhotonIntegrator::gatherComponentOffset [private] |
Definition at line 79 of file photonmap.h.
Referenced by Li(), and RequestSamples().
int lux::PhotonIntegrator::gatherSampleOffset [private] |
Definition at line 79 of file photonmap.h.
Referenced by Li(), and RequestSamples().
int lux::PhotonIntegrator::gatherSamples [private] |
Definition at line 75 of file photonmap.h.
Referenced by CreateSurfaceIntegrator(), Li(), PhotonIntegrator(), and RequestSamples().
KdTree<Photon, PhotonProcess>* lux::PhotonIntegrator::indirectMap [mutable, private] |
Definition at line 83 of file photonmap.h.
Referenced by Li(), PhotonIntegrator(), Preprocess(), and ~PhotonIntegrator().
int lux::PhotonIntegrator::lightNumOffset [private] |
Definition at line 77 of file photonmap.h.
Referenced by RequestSamples().
int* lux::PhotonIntegrator::lightSampleOffset [private] |
Definition at line 77 of file photonmap.h.
Referenced by Li(), and RequestSamples().
float lux::PhotonIntegrator::maxDistSquared [private] |
Definition at line 73 of file photonmap.h.
Referenced by Li(), and PhotonIntegrator().
int lux::PhotonIntegrator::maxSpecularDepth [private] |
Definition at line 72 of file photonmap.h.
Referenced by Li(), and PhotonIntegrator().
int lux::PhotonIntegrator::nCausticPaths [private] |
Definition at line 80 of file photonmap.h.
Referenced by Li(), and Preprocess().
u_int lux::PhotonIntegrator::nCausticPhotons [private] |
Definition at line 69 of file photonmap.h.
Referenced by PhotonIntegrator(), and Preprocess().
int lux::PhotonIntegrator::nDirectPaths [private] |
Definition at line 80 of file photonmap.h.
Referenced by Li(), and Preprocess().
u_int lux::PhotonIntegrator::nDirectPhotons [private] |
Definition at line 69 of file photonmap.h.
Referenced by PhotonIntegrator(), and Preprocess().
int lux::PhotonIntegrator::nIndirectPaths [private] |
Definition at line 80 of file photonmap.h.
Referenced by Li(), and Preprocess().
u_int lux::PhotonIntegrator::nIndirectPhotons [private] |
Definition at line 69 of file photonmap.h.
Referenced by PhotonIntegrator(), and Preprocess().
u_int lux::PhotonIntegrator::nLookup [private] |
Definition at line 70 of file photonmap.h.
Referenced by Li(), and PhotonIntegrator().
int lux::PhotonIntegrator::specularDepth [mutable, private] |
Definition at line 71 of file photonmap.h.
Referenced by Li(), and PhotonIntegrator().