lux::LightPhotonMap Class Reference

#include <photonmap.h>

Inheritance diagram for lux::LightPhotonMap:
[legend]
Collaboration diagram for lux::LightPhotonMap:
[legend]

List of all members.

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

Detailed Description

Definition at line 339 of file core/photonmap.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

SWCSpectrum lux::LightPhotonMap::EPhoton ( const TsPack tspack,
const Point p,
const Normal n 
) const

Estimates the incoming irradiance at a surface point.

Parameters:
tspack The thread specific pack.
p The position of the surface point.
n The orientation of the surface.
Returns:
An irradiance estimate.

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]
bool lux::LightPhotonMap::isEmpty (  )  [inline]
SWCSpectrum lux::LightPhotonMap::LDiffusePhoton ( const TsPack tspack,
const BSDF bsdf,
const Intersection isect,
const Vector wo 
) const
void lux::LightPhotonMap::load ( std::basic_istream< char > &  stream,
LightPhotonMap map 
) [static]
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.

Parameters:
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.
Returns:
A radiance estimate.

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.

Parameters:
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.
Returns:
A radiance estimate.

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

Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208