#include <PhotonMapping.h>
Inheritance diagram for PhotonMapping:
Public Member Functions | |
PhotonMapping (AutoPtr< LocalReflection > *r=NULL, const Color3f &bg=Color3f(0, 0, 0), Intersector *i=NULL, unsigned d=1, float w=.001, float f=REFR_AIR, unsigned p=1, unsigned ps=1, unsigned e=20, float m=sqrt(FLT_MAX-1), unsigned pr=2, double pd=.05, int st=GLOBAL_ILLUMINATION, bool il=true, unsigned er=10, bool ci=true) | |
virtual Color3f * | illuminatePoint (PointEnv &) |
virtual void | setScene (Scene *s) |
virtual void | setDiffuseBRDF (DiffuseBRDF *b) |
virtual void | setSpecularBRDF (SpecularBRDF *b) |
virtual void | setEmittance (Emittance *e) |
void | setIntersector (Intersector *i) |
Static Public Attributes | |
static const int | DIRECT_ILLUMINATION = (1<<0) |
static const int | SPECULAR_REFLECTION = (1<<1) |
static const int | CAUSTICS = (1<<2) |
static const int | INDIRECT_ILLUMINATION = (1<<3) |
static const int | GLOBAL_ILLUMINATION |
static const unsigned | PARTITIONING = 30 |
static const unsigned | PARTITIONING_2 = PARTITIONING * PARTITIONING |
static const double | ANTIBIAS_FRACTION = .001 |
Protected Types | |
enum | RefrDir { REFR_DIR_REFLECTION, REFR_DIR_REFRACTION } |
Protected Member Functions | |
bool | _interpolate_irradiance (const vector< IrradianceCache::Value * > &, Color3f &) |
double * | _power_square (const vector< Photon * > &, const Vector3 &, BRDF &, const MatVisitor &, double &) |
double | _importance_sampling (const Vector3 &, BRDF &, const MatVisitor &, double *, double, Vector3 &) |
virtual void | _sample_diffuse (PointEnv &, unsigned, bool, Color3f &, MatVisitor &) |
virtual void | _sample_specular (PointEnv &, unsigned, bool, Color3f &, MatVisitor &) |
virtual void | _cast_secondary_rays (PointEnv &, unsigned, bool, Color3f &, MatVisitor &) |
virtual void | _illuminate (PointEnv &, unsigned, bool, Color3f &) |
virtual void | _cast_the_ray (PointEnv &, unsigned, bool, Color3f &, const Vector3 &, const Vector3 &) |
void | _check_point_of_intersection (PointEnv &) const |
MatVisitor * | _check_material (SceneGraphObject *, bool) |
PointEnv * | _cast_ray (const Vector3 &, const Vector3 &) |
void | _apply_texture (PointEnv &, Color3f &) |
void | _apply_texture (PointEnv &, Vector3 &) |
void | _direct_illumination (PointEnv &, MatVisitor &, unsigned, Color3f &) |
RefrDir | _refraction_dir (PointEnv &, MatVisitor &, bool, Vector3 &) |
void | _reflection_dir (PointEnv &, Vector3 &) |
Protected Attributes | |
unsigned | _photonsPerSpecularSurface |
unsigned | _numPhotonsToEst |
float | _maxDistToEst |
unsigned | _preciseIllumRefl |
double | _preciseIllumDist |
int | _illumStage |
bool | _incomingLighting |
unsigned | _maxError |
bool | _cacheIrradiance |
double | _sceneDistance |
unsigned | _specReflections |
bool | _diffReflection |
const PhotonMap * | _pGlobalMap |
const PhotonMap * | _pCausticsMap |
IrradianceCache * | _pIrradCache |
unsigned | _photonsPerSurface |
AutoPtr< LocalReflection > * | _pAReflection |
Color3f | _background |
Intersector * | _pIntersector |
unsigned | _maxDepth |
float | _minRayWeight |
float | _defaultMediumRefraction |
LocalReflection * | _pLocalReflection |
RayIntExplorer | _riExplorer |
Texture * | _pTexture |
Sgi::hash_map< SceneGraphObject::OID, MatVisitor * > | _matCache |
DiffuseBRDF * | _pDiffuseBRDF |
SpecularBRDF * | _pSpecularBRDF |
Emittance * | _pEmittance |
Scene * | _pScene |
Definition at line 20 of file PhotonMapping.h.
|
Definition at line 48 of file RayTracing.h. |
|
Definition at line 118 of file PhotonMapping.h. |
|
Definition at line 116 of file RayTracing.cc. References RayTracing::_pTexture. |
|
Definition at line 84 of file RayTracing.cc. References RayTracing::_pTexture. Referenced by RayTracing::_cast_secondary_rays(), and RayTracing::_direct_illumination(). |
|
Definition at line 53 of file RayTracing.cc. References RayTracing::_pIntersector, ReflectionModel::_pScene, RayTracing::_riExplorer, and Scene::root(). Referenced by RayTracing::_cast_secondary_rays(), and PathTracing::_cast_the_ray(). |
|
Reimplemented from PathTracing. Definition at line 86 of file PhotonMapping.h. |
|
Definition at line 6 of file PathTracing.cc. References RayTracing::_background, RayTracing::_cast_ray(), RayTracing::_illuminate(), and RayTracing::_minRayWeight. Referenced by PathTracing::_cast_secondary_rays(), and PhotonMapping::_sample_specular(). |
|
|
Definition at line 6 of file RayTracing.cc. Referenced by RayTracing::_illuminate(), PhotonTracing::_illuminate(), PhotonMapping::_illuminate(), and Caustics::_illuminate(). |
|
Definition at line 148 of file RayTracing.cc. References RayTracing::_apply_texture(), RayTracing::_pLocalReflection, LocalReflection::illuminatePoint(), and LocalReflection::setActBlockingObjCache(). Referenced by RayTracing::_illuminate(), and PhotonMapping::_illuminate(). |
|
|
Definition at line 126 of file PhotonMapping.cc. References PhotonMapping::ANTIBIAS_FRACTION, PhotonMapping::PARTITIONING, and PhotonMapping::PARTITIONING_2. |
|
Definition at line 60 of file PhotonMapping.cc. Referenced by PhotonMapping::_sample_diffuse(). |
|
Definition at line 86 of file PhotonMapping.cc. References PhotonMapping::PARTITIONING, and PhotonMapping::PARTITIONING_2. |
|
Definition at line 188 of file RayTracing.cc. Referenced by RayTracing::_cast_secondary_rays(), and PhotonMapping::_sample_specular(). |
|
Definition at line 164 of file RayTracing.cc. References RayTracing::_defaultMediumRefraction, RayTracing::REFR_DIR_REFLECTION, and RayTracing::REFR_DIR_REFRACTION. Referenced by RayTracing::_cast_secondary_rays(), and PhotonMapping::_sample_specular(). |
|
Definition at line 179 of file PhotonMapping.cc. References PhotonMapping::_interpolate_irradiance(), ReflectionModel::_pDiffuseBRDF, and PhotonMapping::_pIrradCache. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 385 of file PhotonMapping.cc. References PathTracing::_cast_the_ray(), PhotonMapping::_photonsPerSpecularSurface, ReflectionModel::_pSpecularBRDF, RayTracing::_reflection_dir(), RayTracing::_refraction_dir(), and RayTracing::REFR_DIR_REFLECTION. Referenced by PhotonMapping::_illuminate(). |
|
Reimplemented from RayTracing. Definition at line 624 of file PhotonMapping.cc. References PhotonMapping::_diffReflection, PhotonMapping::_pCausticsMap, PhotonMapping::_pGlobalMap, PhotonMapping::_pIrradCache, PhotonMapping::_specReflections, and RayTracing::illuminatePoint(). |
|
Reimplemented from ReflectionModel. Definition at line 98 of file RayTracing.h. References ReflectionModel::setDiffuseBRDF(). Referenced by PhotonMapShader::distributeEnergy(). |
|
Reimplemented from ReflectionModel. Definition at line 110 of file RayTracing.h. References ReflectionModel::setEmittance(). |
|
Definition at line 134 of file RayTracing.h. |
|
Sets rendered scene. If irradiance caching is required then also discovers and sets the maximal scene distance. Reimplemented from RayTracing. Definition at line 634 of file PhotonMapping.cc. References PhotonMapping::_cacheIrradiance, Scene::root(), and RayTracing::setScene(). |
|
Reimplemented from ReflectionModel. Definition at line 104 of file RayTracing.h. References ReflectionModel::setSpecularBRDF(). Referenced by PhotonMapShader::distributeEnergy(). |
|
Definition at line 37 of file RayTracing.h. Referenced by RayTracing::_cast_secondary_rays(), and PathTracing::_cast_the_ray(). |
|
Definition at line 42 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(), and PhotonMapping::setScene(). |
|
Definition at line 41 of file RayTracing.h. Referenced by RayTracing::_refraction_dir(). |
|
Definition at line 46 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(), and PhotonMapping::illuminatePoint(). |
|
Definition at line 39 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 40 of file PhotonMapping.h. |
|
Definition at line 46 of file RayTracing.h. Referenced by RayTracing::_check_material(). |
|
Definition at line 39 of file RayTracing.h. Referenced by RayTracing::_illuminate(), PhotonTracing::_illuminate(), and Caustics::_illuminate(). |
|
Definition at line 36 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 41 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 40 of file RayTracing.h. Referenced by RayTracing::_cast_secondary_rays(), and PathTracing::_cast_the_ray(). |
|
Definition at line 35 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 36 of file RayTracing.h. |
|
Definition at line 49 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(), and PhotonMapping::illuminatePoint(). |
|
|
Definition at line 41 of file ReflectionModel.h. Referenced by LocalReflection::illuminatePoint(). |
|
Definition at line 48 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(), and PhotonMapping::illuminatePoint(). |
|
Definition at line 34 of file PhotonMapping.h. Referenced by PhotonMapping::_sample_specular(). |
|
Definition at line 24 of file PathTracing.h. Referenced by PathTracing::_cast_secondary_rays(). |
|
Definition at line 38 of file RayTracing.h. Referenced by RayTracing::_cast_ray(), RayTracing::illuminatePoint(), and PhotonTracing::illuminatePoint(). |
|
Definition at line 51 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(), PhotonMapping::_sample_diffuse(), and PhotonMapping::illuminatePoint(). |
|
Definition at line 42 of file RayTracing.h. Referenced by RayTracing::_check_material(), RayTracing::_direct_illumination(), and RayTracing::illuminatePoint(). |
|
Definition at line 38 of file PhotonMapping.h. |
|
Definition at line 37 of file PhotonMapping.h. |
|
Definition at line 42 of file ReflectionModel.h. Referenced by RayTracing::_cast_ray(), LocalReflection::_light_visible(), RayTracing::illuminatePoint(), PhotonTracing::illuminatePoint(), LocalReflection::illuminatePoint(), Radiosity::setScene(), and LocalReflection::setScene(). |
|
|
Definition at line 44 of file RayTracing.h. Referenced by RayTracing::_apply_texture(), and RayTracing::_check_material(). |
|
Definition at line 43 of file RayTracing.h. Referenced by RayTracing::_cast_ray(). |
|
Definition at line 43 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 45 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(), and PhotonMapping::illuminatePoint(). |
|
Definition at line 31 of file PhotonMapping.h. Referenced by PhotonMapping::_importance_sampling(). |
|
Definition at line 24 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 22 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Initial value: Definition at line 27 of file PhotonMapping.h. |
|
Definition at line 25 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |
|
Definition at line 29 of file PhotonMapping.h. Referenced by PhotonMapping::_importance_sampling(), and PhotonMapping::_power_square(). |
|
Definition at line 30 of file PhotonMapping.h. Referenced by PhotonMapping::_importance_sampling(), and PhotonMapping::_power_square(). |
|
Definition at line 23 of file PhotonMapping.h. Referenced by PhotonMapping::_illuminate(). |