lux::ExPhotonIntegrator Class Reference

#include <exphotonmap.h>

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

List of all members.

Public Types

enum  RenderingMode { RM_DIRECTLIGHTING, RM_PATH }
enum  LightStrategy { SAMPLE_ALL_UNIFORM, SAMPLE_ONE_UNIFORM, SAMPLE_AUTOMATIC }

Public Member Functions

 ExPhotonIntegrator (RenderingMode rm, LightStrategy st, int ndir, int ncaus, int nindir, int nrad, int nLookup, int mdepth, int mpdepth, float maxdist, bool finalGather, int gatherSamples, float ga, PhotonMapRRStrategy rrstrategy, float rrcontprob, float distThreshold, string *mapsFileName, bool dbgEnableDirect, bool dbgEnableDirectMap, bool dbgEnableCaustic, bool dbgEnableIndirect, bool dbgEnableSpecular)
virtual ~ExPhotonIntegrator ()
virtual int Li (const TsPack *tspack, const Scene *scene, const Sample *sample) const
virtual void RequestSamples (Sample *sample, const Scene *scene)
virtual void Preprocess (const TsPack *tspack, const Scene *scene)
 ExPhotonIntegrator (int ncaus, int nindir, int nLookup, int mdepth, float maxdist, bool finalGather, int gatherSamples, float rrt, float ga)
 ~ExPhotonIntegrator ()
Spectrum Li (const Scene *scene, const RayDifferential &ray, const Sample *sample, float *alpha) const
void RequestSamples (Sample *sample, const Scene *scene)
void Preprocess (const Scene *)
virtual ExPhotonIntegrator * clone () const
IntegrationSampler * HasIntegrationSampler (IntegrationSampler *is)

Static Public Member Functions

static SurfaceIntegrator * CreateSurfaceIntegrator (const ParamSet &params)
static SurfaceIntegrator * CreateSurfaceIntegrator (const ParamSet &params)

Private Member Functions

SWCSpectrum LiDirectLightingMode (const TsPack *tspack, const Scene *scene, const RayDifferential &ray, const Sample *sample, float *alpha, const int reflectionDepth, const bool specularBounce) const
SWCSpectrum LiPathMode (const TsPack *tspack, const Scene *scene, const RayDifferential &ray, const Sample *sample, float *alpha) const
Spectrum estimateE (KdTree< EPhoton, EPhotonProcess > *map, int count, const Point &p, const Normal &n) const

Static Private Member Functions

static bool unsuccessful (int needed, int found, int shot)
static Spectrum LPhoton (KdTree< EPhoton, EPhotonProcess > *map, int nPaths, int nLookup, BSDF *bsdf, const Intersection &isect, const Vector &w, float maxDistSquared)

Private Attributes

RenderingMode renderingMode
LightStrategy lightStrategy
u_int nDirectPhotons
u_int nCausticPhotons
u_int nIndirectPhotons
u_int nRadiancePhotons
u_int nLookup
int maxDepth
int maxPhotonDepth
float maxDistSquared
bool finalGather
float cosGatherAngle
int gatherSamples
PhotonMapRRStrategy rrStrategy
float rrContinueProbability
float distanceThreshold
string * mapsFileName
bool debugEnableDirect
bool debugUseRadianceMap
bool debugEnableCaustic
bool debugEnableIndirect
bool debugEnableSpecular
int bufferId
int sampleOffset
int sampleFinalGather1Offset
int sampleFinalGather2Offset
LightPhotonMap * causticMap
LightPhotonMap * indirectMap
RadiancePhotonMap * radianceMap
int gatherSampleOffset [2]
int gatherComponentOffset [2]
int specularDepth
int maxSpecularDepth
float rrTreshold
int * lightSampleOffset
int lightNumOffset
int * bsdfSampleOffset
int * bsdfComponentOffset
int nCausticPaths
int nIndirectPaths
KdTree< EPhoton, EPhotonProcess > * causticMap
KdTree< EPhoton, EPhotonProcess > * indirectMap
KdTree< ERadiancePhoton,
ERadiancePhotonProcess > * 
radianceMap

Detailed Description

Definition at line 38 of file integrators/exphotonmap.h.


Member Enumeration Documentation

Enumerator:
SAMPLE_ALL_UNIFORM 
SAMPLE_ONE_UNIFORM 
SAMPLE_AUTOMATIC 

Definition at line 42 of file integrators/exphotonmap.h.

Enumerator:
RM_DIRECTLIGHTING 
RM_PATH 

Definition at line 41 of file integrators/exphotonmap.h.


Constructor & Destructor Documentation

ExPhotonIntegrator::ExPhotonIntegrator ( RenderingMode  rm,
LightStrategy  st,
int  ndir,
int  ncaus,
int  nindir,
int  nrad,
int  nLookup,
int  mdepth,
int  mpdepth,
float  maxdist,
bool  finalGather,
int  gatherSamples,
float  ga,
PhotonMapRRStrategy  rrstrategy,
float  rrcontprob,
float  distThreshold,
string *  mapsFileName,
bool  dbgEnableDirect,
bool  dbgEnableDirectMap,
bool  dbgEnableCaustic,
bool  dbgEnableIndirect,
bool  dbgEnableSpecular 
)
ExPhotonIntegrator::~ExPhotonIntegrator (  )  [virtual]

Definition at line 76 of file integrators/exphotonmap.cpp.

References causticMap, indirectMap, mapsFileName, and radianceMap.

ExPhotonIntegrator::ExPhotonIntegrator ( int  ncaus,
int  nindir,
int  nLookup,
int  mdepth,
float  maxdist,
bool  finalGather,
int  gatherSamples,
float  rrt,
float  ga 
)
lux::ExPhotonIntegrator::~ExPhotonIntegrator (  ) 

Member Function Documentation

ExPhotonIntegrator * ExPhotonIntegrator::clone (  )  const [virtual]

Definition at line 29 of file pbrtattic/integrators/exphotonmap.cpp.

References ExPhotonIntegrator().

static SurfaceIntegrator* lux::ExPhotonIntegrator::CreateSurfaceIntegrator ( const ParamSet &  params  )  [static]
SurfaceIntegrator * ExPhotonIntegrator::CreateSurfaceIntegrator ( const ParamSet &  params  )  [static]
Spectrum ExPhotonIntegrator::estimateE ( KdTree< EPhoton, EPhotonProcess > *  map,
int  count,
const Point &  p,
const Normal &  n 
) const [private]
IntegrationSampler* lux::ExPhotonIntegrator::HasIntegrationSampler ( IntegrationSampler *  is  )  [inline]

Definition at line 120 of file pbrtattic/integrators/exphotonmap.h.

Spectrum ExPhotonIntegrator::Li ( const Scene *  scene,
const RayDifferential &  ray,
const Sample *  sample,
float *  alpha 
) const

Definition at line 383 of file pbrtattic/integrators/exphotonmap.cpp.

References lux::AbsDot(), lux::BSDF_ALL, lux::BSDF_DIFFUSE, lux::BSDF_GLOSSY, lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, bsdfComponentOffset, bsdfSampleOffset, causticMap, lux::CoordinateSystem(), cosGatherAngle, lux::Ray::d, lux::Intersection::dg, lux::BSDF::dgShading, 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, lux::BSDF::f(), finalGather, Floor2Int(), lux::EPhotonProcess::foundPhotons, gatherComponentOffset, gatherSampleOffset, gatherSamples, lux::Intersection::GetBSDF(), lux::RayDifferential::hasDifferentials, indirectMap, lux::Scene::Intersect(), lux::Intersection::Le(), lux::Scene::Li(), Li(), lux::Scene::lights, lightSampleOffset, lux::ERadiancePhoton::Lo, LPhoton(), maxDistSquared, maxSpecularDepth, cimg_library::cimg::min(), nCausticPaths, nIndirectPaths, nLookup, lux::DifferentialGeometry::nn, lux::BSDF::NumComponents(), lux::Ray::o, lux::Sample::oneD, lux::DifferentialGeometry::p, p, lux::BSDF::Pdf(), lux::ERadiancePhotonProcess::photon, lux::EClosePhoton::photon, lux::EPhotonProcess::photons, lux::PowerHeuristic(), radianceMap, lux::RayDifferential::rx, lux::RayDifferential::ry, lux::BSDF::Sample_f(), specularDepth, lux::Scene::Transmittance(), lux::Sample::twoD, lux::UniformConePdf(), lux::UniformSampleAllLights(), lux::UniformSampleCone(), and lux::EPhoton::wi.

int ExPhotonIntegrator::Li ( const TsPack *  tspack,
const Scene *  scene,
const Sample *  sample 
) const [virtual]
SWCSpectrum ExPhotonIntegrator::LiDirectLightingMode ( const TsPack *  tspack,
const Scene *  scene,
const RayDifferential &  ray,
const Sample *  sample,
float *  alpha,
const int  reflectionDepth,
const bool  specularBounce 
) const [private]

Definition at line 204 of file integrators/exphotonmap.cpp.

References lux::AbsDot(), lux::BSDF_DIFFUSE, lux::BSDF_GLOSSY, lux::BSDF_REFLECTION, lux::BSDF_SPECULAR, lux::BSDF_TRANSMISSION, causticMap, cosGatherAngle, lux::Ray::d, debugEnableCaustic, debugEnableDirect, debugEnableIndirect, debugEnableSpecular, debugUseRadianceMap, lux::Intersection::dg, lux::BSDF::dgShading, 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, gatherSamples, lux::Intersection::GetBSDF(), lux::Sampler::GetLazyValues(), lux::BasicColorPhoton::GetSWCSpectrum(), lux::RayDifferential::hasDifferentials, indirectMap, lux::Scene::Intersect(), lux::LightPhotonMap::isEmpty(), lux::LightPhotonMap::LDiffusePhoton(), lux::Intersection::Le(), lux::VolumeIntegrator::Li(), lux::Scene::lights, lightStrategy, lux::PhotonMap< PhotonType, PhotonProcess >::lookup(), maxDepth, lux::RadiancePhotonMap::maxDistSquared, lux::DifferentialGeometry::nn, lux::Ray::o, lux::DifferentialGeometry::p, p, lux::NearPhotonProcess< PhotonType >::photon, lux::PhotonMapFinalGatherWithImportaceSampling(), radianceMap, rrContinueProbability, rrStrategy, lux::RayDifferential::rx, lux::RayDifferential::ry, SAMPLE_ALL_UNIFORM, lux::BSDF::Sample_f(), SAMPLE_ONE_UNIFORM, sampleFinalGather1Offset, sampleFinalGather2Offset, sampleOffset, lux::Sample::sampler, lux::VolumeIntegrator::Transmittance(), lux::UniformSampleAllLights(), lux::UniformSampleOneLight(), and lux::Scene::volumeIntegrator.

Referenced by Li().

SWCSpectrum ExPhotonIntegrator::LiPathMode ( const TsPack *  tspack,
const Scene *  scene,
const RayDifferential &  ray,
const Sample *  sample,
float *  alpha 
) const [private]
Spectrum ExPhotonIntegrator::LPhoton ( KdTree< EPhoton, EPhotonProcess > *  map,
int  nPaths,
int  nLookup,
BSDF *  bsdf,
const Intersection &  isect,
const Vector &  w,
float  maxDistSquared 
) [static, private]
void ExPhotonIntegrator::Preprocess ( const Scene *  scene  ) 
void ExPhotonIntegrator::Preprocess ( const TsPack *  tspack,
const Scene *  scene 
) [virtual]
void lux::ExPhotonIntegrator::RequestSamples ( Sample *  sample,
const Scene *  scene 
) [virtual]

Reimplemented from lux::Integrator.

void ExPhotonIntegrator::RequestSamples ( Sample *  sample,
const Scene *  scene 
) [virtual]
static bool lux::ExPhotonIntegrator::unsuccessful ( int  needed,
int  found,
int  shot 
) [inline, static, private]

Definition at line 123 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Preprocess().


Member Data Documentation

Definition at line 146 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li().

Definition at line 146 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li().

Definition at line 96 of file integrators/exphotonmap.h.

Referenced by Li(), and Preprocess().

Definition at line 148 of file pbrtattic/integrators/exphotonmap.h.

Definition at line 83 of file integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), Li(), and LiDirectLightingMode().

Definition at line 135 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li().

Definition at line 135 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li().

Definition at line 149 of file pbrtattic/integrators/exphotonmap.h.

Definition at line 145 of file pbrtattic/integrators/exphotonmap.h.

Definition at line 145 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li().

Definition at line 80 of file integrators/exphotonmap.h.

Referenced by estimateE(), ExPhotonIntegrator(), Li(), and Preprocess().

Definition at line 139 of file pbrtattic/integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), and Li().

Definition at line 147 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li(), and Preprocess().

Definition at line 77 of file integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), and Preprocess().

Definition at line 77 of file integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), and Preprocess().

Definition at line 147 of file pbrtattic/integrators/exphotonmap.h.

Referenced by Li(), and Preprocess().

Definition at line 77 of file integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), and Preprocess().

Definition at line 78 of file integrators/exphotonmap.h.

Referenced by estimateE(), ExPhotonIntegrator(), Li(), and Preprocess().

Definition at line 77 of file integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), and Preprocess().

Definition at line 150 of file pbrtattic/integrators/exphotonmap.h.

Definition at line 86 of file integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), LiDirectLightingMode(), and LiPathMode().

Definition at line 140 of file pbrtattic/integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator().

Definition at line 100 of file integrators/exphotonmap.h.

Referenced by LiDirectLightingMode(), and RequestSamples().

Definition at line 101 of file integrators/exphotonmap.h.

Referenced by LiDirectLightingMode(), and RequestSamples().

Definition at line 99 of file integrators/exphotonmap.h.

Referenced by LiDirectLightingMode(), LiPathMode(), and RequestSamples().

Definition at line 138 of file pbrtattic/integrators/exphotonmap.h.

Referenced by ExPhotonIntegrator(), and Li().


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