#include <photonmap.h>
Public Member Functions | |
LightPhotonMap (u_int nl, float md) | |
virtual | ~LightPhotonMap () |
void | init (int npaths, const vector< LightPhoton > &photons) |
bool | isEmpty () |
SWCSpectrum | EPhoton (const TsPack *tspack, const Point &p, const Normal &n) const |
SWCSpectrum | LPhoton (const TsPack *tspack, const BSDF *bsdf, const Intersection &isect, const Vector &wo, const BxDFType bxdfType) const |
SWCSpectrum | LPhotonDiffuseApprox (const TsPack *tspack, const BSDF *bsdf, const Intersection &isect, const Vector &wo, const BxDFType bxdfType) const |
SWCSpectrum | LDiffusePhoton (const TsPack *tspack, const BSDF *bsdf, const Intersection &isect, const Vector &wo) const |
void | save (std::basic_ostream< char > &stream) const |
Static Public Member Functions | |
static void | load (std::basic_istream< char > &stream, LightPhotonMap *map) |
Public Attributes | |
const u_int | nLookup |
const float | maxDistSquared |
Private Attributes | |
u_int | nPaths |
Definition at line 339 of file core/photonmap.h.
lux::LightPhotonMap::LightPhotonMap | ( | u_int | nl, | |
float | md | |||
) | [inline] |
Definition at line 341 of file core/photonmap.h.
virtual lux::LightPhotonMap::~LightPhotonMap | ( | ) | [inline, virtual] |
Definition at line 344 of file core/photonmap.h.
SWCSpectrum lux::LightPhotonMap::EPhoton | ( | const TsPack * | tspack, | |
const Point & | p, | |||
const Normal & | n | |||
) | const |
Estimates the incoming irradiance at a surface point.
tspack | The thread specific pack. | |
p | The position of the surface point. | |
n | The orientation of the surface. |
Definition at line 168 of file core/photonmap.cpp.
References lux::Dot(), lux::NearSetPhotonProcess< PhotonType >::foundPhotons, lux::BasicColorPhoton::GetSWCSpectrum(), lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::lookup(), M_PI, maxDistSquared, nLookup, nPaths, lux::ClosePhoton< PhotonType >::photon, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonmap, and lux::NearSetPhotonProcess< PhotonType >::photons.
void lux::LightPhotonMap::init | ( | int | npaths, | |
const vector< LightPhoton > & | photons | |||
) | [inline] |
Definition at line 346 of file core/photonmap.h.
References nPaths, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonCount, and lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonmap.
Referenced by load().
bool lux::LightPhotonMap::isEmpty | ( | ) | [inline] |
Definition at line 352 of file core/photonmap.h.
References nPaths.
Referenced by lux::ExPhotonIntegrator::LiDirectLightingMode(), and lux::ExPhotonIntegrator::LiPathMode().
SWCSpectrum lux::LightPhotonMap::LDiffusePhoton | ( | const TsPack * | tspack, | |
const BSDF * | bsdf, | |||
const Intersection & | isect, | |||
const Vector & | wo | |||
) | const |
Estimates the outgoing radiance by diffuse reflection at a surface point in a single direction.
tspack | The thread specific pack. | |
bsdf | The bsdf of the surface point. | |
isect | The surface point intersection. | |
wo | The outgoing direction. |
Definition at line 279 of file core/photonmap.cpp.
References lux::BSDF_DIFFUSE, lux::BSDF_REFLECTION, lux::BSDF_TRANSMISSION, lux::Intersection::dg, lux::Dot(), lux::Ekernel(), lux::NearSetPhotonProcess< PhotonType >::foundPhotons, lux::BasicColorPhoton::GetSWCSpectrum(), INV_PI, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::lookup(), maxDistSquared, nLookup, lux::DifferentialGeometry::nn, nPaths, lux::BSDF::NumComponents(), p, lux::DifferentialGeometry::p, lux::ClosePhoton< PhotonType >::photon, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonmap, lux::NearSetPhotonProcess< PhotonType >::photons, and lux::BSDF::rho().
Referenced by lux::ExPhotonIntegrator::LiDirectLightingMode(), and lux::ExPhotonIntegrator::LiPathMode().
void lux::LightPhotonMap::load | ( | std::basic_istream< char > & | stream, | |
LightPhotonMap * | map | |||
) | [static] |
Definition at line 1084 of file core/photonmap.cpp.
References init(), lux::osIsLittleEndian(), and lux::osReadLittleEndianInt().
SWCSpectrum lux::LightPhotonMap::LPhoton | ( | const TsPack * | tspack, | |
const BSDF * | bsdf, | |||
const Intersection & | isect, | |||
const Vector & | wo, | |||
const BxDFType | bxdfType | |||
) | const |
Estimates the outgoing radiance at a surface point in a single direction.
tspack | The thread specific pack. | |
bsdf | The bsdf of the surface point. | |
isect | The surface point intersection. | |
wo | The outgoing direction. | |
bxdfType | The bxdf types at the surface point to to take into account. |
Definition at line 192 of file core/photonmap.cpp.
References lux::BSDF_ALL_REFLECTION, lux::BSDF_ALL_TRANSMISSION, lux::Intersection::dg, lux::Dot(), lux::Ekernel(), lux::BSDF::f(), lux::NearSetPhotonProcess< PhotonType >::foundPhotons, lux::BasicColorPhoton::GetSWCSpectrum(), lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::lookup(), maxDistSquared, nLookup, lux::DifferentialGeometry::nn, nPaths, lux::BSDF::NumComponents(), p, lux::DifferentialGeometry::p, lux::ClosePhoton< PhotonType >::photon, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonmap, lux::NearSetPhotonProcess< PhotonType >::photons, and lux::LightPhoton::wi.
SWCSpectrum lux::LightPhotonMap::LPhotonDiffuseApprox | ( | const TsPack * | tspack, | |
const BSDF * | bsdf, | |||
const Intersection & | isect, | |||
const Vector & | wo, | |||
const BxDFType | bxdfType | |||
) | const |
Estimates the outgoing radiance at a surface point in a single direction using a diffuse surface approximation.
tspack | The thread specific pack. | |
bsdf | The bsdf of the surface point. | |
isect | The surface point intersection. | |
wo | The outgoing direction. | |
bxdfType | The bxdf types at the surface point to to take into account. |
Definition at line 232 of file core/photonmap.cpp.
References lux::BSDF_ALL_REFLECTION, lux::BSDF_ALL_TRANSMISSION, lux::BSDF_REFLECTION, lux::BSDF_TRANSMISSION, lux::Intersection::dg, lux::Dot(), lux::Ekernel(), lux::NearSetPhotonProcess< PhotonType >::foundPhotons, lux::BasicColorPhoton::GetSWCSpectrum(), INV_PI, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::lookup(), maxDistSquared, nLookup, lux::DifferentialGeometry::nn, nPaths, lux::BSDF::NumComponents(), p, lux::DifferentialGeometry::p, lux::ClosePhoton< PhotonType >::photon, lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonmap, lux::NearSetPhotonProcess< PhotonType >::photons, and lux::BSDF::rho().
void lux::LightPhotonMap::save | ( | std::basic_ostream< char > & | stream | ) | const |
Definition at line 1106 of file core/photonmap.cpp.
References lux::KdTree< NodeData, LookupProc >::getNodeData(), nPaths, lux::osIsLittleEndian(), lux::osWriteLittleEndianInt(), lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonCount, and lux::PhotonMap< LightPhoton, NearSetPhotonProcess< LightPhoton > >::photonmap.
const float lux::LightPhotonMap::maxDistSquared |
Definition at line 429 of file core/photonmap.h.
Referenced by EPhoton(), LDiffusePhoton(), LPhoton(), and LPhotonDiffuseApprox().
Definition at line 428 of file core/photonmap.h.
Referenced by EPhoton(), LDiffusePhoton(), LPhoton(), and LPhotonDiffuseApprox().
u_int lux::LightPhotonMap::nPaths [private] |
Definition at line 431 of file core/photonmap.h.
Referenced by EPhoton(), init(), isEmpty(), LDiffusePhoton(), LPhoton(), LPhotonDiffuseApprox(), and save().