Definition at line 107 of file exphotonmap.cpp.
ExPhotonIntegrator::ExPhotonIntegrator | ( | int | ncaus, | |
int | nindir, | |||
int | nLookup, | |||
int | mdepth, | |||
float | maxdist, | |||
bool | finalGather, | |||
int | gatherSamples, | |||
float | rrt, | |||
float | ga | |||
) |
Definition at line 250 of file exphotonmap.cpp.
References causticMap, cosGatherAngle, finalGather, gatherSamples, indirectMap, maxDistSquared, maxSpecularDepth, nCausticPhotons, nIndirectPhotons, nLookup, radianceMap, Radians(), rrTreshold, and specularDepth.
Referenced by CreateSurfaceIntegrator().
ExPhotonIntegrator::~ExPhotonIntegrator | ( | ) |
Definition at line 266 of file exphotonmap.cpp.
References causticMap, indirectMap, and radianceMap.
Spectrum ExPhotonIntegrator::Li | ( | const Scene * | scene, | |
const RayDifferential & | ray, | |||
const Sample * | sample, | |||
float * | alpha | |||
) | const [virtual] |
Implements Integrator.
Definition at line 494 of file exphotonmap.cpp.
References AbsDot(), Spectrum::Black(), BSDF_ALL, BSDF_DIFFUSE, BSDF_GLOSSY, BSDF_REFLECTION, BSDF_SPECULAR, BSDF_TRANSMISSION, bsdfComponentOffset, bsdfSampleOffset, causticMap, CoordinateSystem(), cosGatherAngle, Ray::d, Intersection::dg, BSDF::dgShading, DifferentialGeometry::dndu, DifferentialGeometry::dndv, Dot(), DifferentialGeometry::dpdx, DifferentialGeometry::dpdy, DifferentialGeometry::dudx, DifferentialGeometry::dudy, DifferentialGeometry::dvdx, DifferentialGeometry::dvdy, BSDF::eta, BSDF::f(), finalGather, Floor2Int(), PhotonProcess::foundPhotons, gatherComponentOffset, gatherSampleOffset, gatherSamples, Intersection::GetBSDF(), RayDifferential::hasDifferentials, indirectMap, INFINITY, Scene::Intersect(), Intersection::Le(), Scene::Li(), Scene::lights, lightSampleOffset, RadiancePhoton::Lo, KdTree< NodeData, LookupProc >::Lookup(), LPhoton(), maxDistSquared, maxSpecularDepth, nCausticPaths, nIndirectPaths, nLookup, DifferentialGeometry::nn, BSDF::NumComponents(), Ray::o, Sample::oneD, DifferentialGeometry::p, BSDF::Pdf(), RadiancePhotonProcess::photon, ClosePhoton::photon, PhotonProcess::photons, PowerHeuristic(), radianceMap, RayDifferential::rx, RayDifferential::ry, BSDF::Sample_f(), specularDepth, Scene::Transmittance(), Sample::twoD, UniformConePdf(), UniformSampleAllLights(), UniformSampleCone(), and Photon::wi.
Reimplemented from Integrator.
Definition at line 271 of file exphotonmap.cpp.
References Sample::Add1D(), Sample::Add2D(), bsdfComponentOffset, bsdfSampleOffset, finalGather, gatherComponentOffset, gatherSampleOffset, gatherSamples, lightNumOffset, Scene::lights, lightSampleOffset, Light::nSamples, Sampler::RoundSize(), and Scene::sampler.
void ExPhotonIntegrator::Preprocess | ( | const Scene * | scene | ) | [virtual] |
Reimplemented from Integrator.
Definition at line 298 of file exphotonmap.cpp.
References AbsDot(), Spectrum::Black(), BSDF_ALL, BSDF_ALL_REFLECTION, BSDF_ALL_TRANSMISSION, BSDF_REFLECTION, BSDF_SPECULAR, BSDF_TRANSMISSION, causticMap, ComputeStep1dCDF(), Ray::d, Intersection::dg, BSDF::dgShading, ProgressReporter::Done(), Dot(), Error(), estimateE(), finalGather, Floor2Int(), BSDF::FreeAll(), Intersection::GetBSDF(), indirectMap, Scene::Intersect(), INV_PI, Scene::lights, RadiancePhoton::Lo, RadiancePhoton::n, nCausticPaths, nCausticPhotons, nIndirectPaths, nIndirectPhotons, DifferentialGeometry::nn, BSDF::NumComponents(), RadiancePhoton::p, DifferentialGeometry::p, radianceMap, RadicalInverse(), RandomFloat(), BSDF::rho(), BSDF::Sample_f(), Light::Sample_L(), SampleStep1d(), Scene::Transmittance(), unsuccessful(), ProgressReporter::Update(), and Spectrum::y().
static bool ExPhotonIntegrator::unsuccessful | ( | int | needed, | |
int | found, | |||
int | shot | |||
) | [inline, static, private] |
Spectrum ExPhotonIntegrator::LPhoton | ( | KdTree< Photon, PhotonProcess > * | map, | |
int | nPaths, | |||
int | nLookup, | |||
BSDF * | bsdf, | |||
const Intersection & | isect, | |||
const Vector & | w, | |||
float | maxDistSquared | |||
) | [static, private] |
Definition at line 190 of file exphotonmap.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, kernel(), KdTree< NodeData, LookupProc >::Lookup(), DifferentialGeometry::nn, BSDF::NumComponents(), DifferentialGeometry::p, ClosePhoton::photon, PhotonProcess::photons, BSDF::rho(), and Photon::wi.
Referenced by Li().
Spectrum ExPhotonIntegrator::estimateE | ( | KdTree< Photon, PhotonProcess > * | map, | |
int | count, | |||
const Point & | p, | |||
const Normal & | n | |||
) | const [private] |
Definition at line 150 of file exphotonmap.cpp.
References Photon::alpha, Dot(), PhotonProcess::foundPhotons, KdTree< NodeData, LookupProc >::Lookup(), M_PI, maxDistSquared, nLookup, ClosePhoton::photon, and PhotonProcess::photons.
Referenced by Preprocess().
int ExPhotonIntegrator::gatherSampleOffset[2] [private] |
int ExPhotonIntegrator::gatherComponentOffset[2] [private] |
u_int ExPhotonIntegrator::nCausticPhotons [private] |
Definition at line 132 of file exphotonmap.cpp.
Referenced by ExPhotonIntegrator(), and Preprocess().
u_int ExPhotonIntegrator::nIndirectPhotons [private] |
Definition at line 132 of file exphotonmap.cpp.
Referenced by ExPhotonIntegrator(), and Preprocess().
u_int ExPhotonIntegrator::nLookup [private] |
Definition at line 133 of file exphotonmap.cpp.
Referenced by estimateE(), ExPhotonIntegrator(), and Li().
int ExPhotonIntegrator::specularDepth [mutable, private] |
int ExPhotonIntegrator::maxSpecularDepth [private] |
float ExPhotonIntegrator::maxDistSquared [private] |
Definition at line 136 of file exphotonmap.cpp.
Referenced by estimateE(), ExPhotonIntegrator(), and Li().
float ExPhotonIntegrator::rrTreshold [private] |
Definition at line 136 of file exphotonmap.cpp.
Referenced by CreateSurfaceIntegrator(), and ExPhotonIntegrator().
bool ExPhotonIntegrator::finalGather [private] |
Definition at line 137 of file exphotonmap.cpp.
Referenced by CreateSurfaceIntegrator(), ExPhotonIntegrator(), Li(), Preprocess(), and RequestSamples().
float ExPhotonIntegrator::cosGatherAngle [private] |
int ExPhotonIntegrator::gatherSamples [private] |
Definition at line 139 of file exphotonmap.cpp.
Referenced by CreateSurfaceIntegrator(), ExPhotonIntegrator(), Li(), and RequestSamples().
int* ExPhotonIntegrator::lightSampleOffset [private] |
int ExPhotonIntegrator::lightNumOffset [private] |
int* ExPhotonIntegrator::bsdfSampleOffset [private] |
int * ExPhotonIntegrator::bsdfComponentOffset [private] |
int ExPhotonIntegrator::nCausticPaths [private] |
int ExPhotonIntegrator::nIndirectPaths [private] |
KdTree<Photon, PhotonProcess>* ExPhotonIntegrator::causticMap [mutable, private] |
Definition at line 144 of file exphotonmap.cpp.
Referenced by ExPhotonIntegrator(), Li(), Preprocess(), and ~ExPhotonIntegrator().
KdTree<Photon, PhotonProcess>* ExPhotonIntegrator::indirectMap [mutable, private] |
Definition at line 145 of file exphotonmap.cpp.
Referenced by ExPhotonIntegrator(), Li(), Preprocess(), and ~ExPhotonIntegrator().
KdTree<RadiancePhoton, RadiancePhotonProcess>* ExPhotonIntegrator::radianceMap [mutable, private] |
Definition at line 146 of file exphotonmap.cpp.
Referenced by ExPhotonIntegrator(), Li(), Preprocess(), and ~ExPhotonIntegrator().