rcrt::PhotonMap Class Reference

#include <PhotonMap.h>

Collaboration diagram for rcrt::PhotonMap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PhotonMap (Scene *s, const float &maxRadius, const int &maxBounces, const float &flatten=0)
virtual ~PhotonMap ()
void generate (const int &noPhotons)
RGBColor getRadiance (const Vec3D &wOut, const int &noGPhotons, const int &noCPhotons, Intersection &is)
const float & getMaxRadius () const

Private Member Functions

void generateJob (Light *light, std::vector< Photon * > *photons, std::vector< Photon * > *caustics1, const int &noPhotons, int &storedTotal)

Private Attributes

Scenescene
std::vector< Photon * > photons
std::vector< Photon * > caustics
PhotonKDTree globalTree
PhotonKDTree causticTree
float maxRadius
int maxBounces
float currentRadius
float flat


Detailed Description

Definition at line 14 of file PhotonMap.h.


Constructor & Destructor Documentation

rcrt::PhotonMap::PhotonMap ( Scene s,
const float &  maxRadius,
const int &  maxBounces,
const float &  flatten = 0 
)

Definition at line 12 of file PhotonMap.cpp.

rcrt::PhotonMap::~PhotonMap (  )  [virtual]

Definition at line 18 of file PhotonMap.cpp.

References photons.


Member Function Documentation

void rcrt::PhotonMap::generateJob ( Light light,
std::vector< Photon * > *  photons,
std::vector< Photon * > *  caustics1,
const int &  noPhotons,
int &  storedTotal 
) [private]

Definition at line 141 of file PhotonMap.cpp.

References rcrt::Photon::addBounce(), rcrt::DIFFUSE, rcrt::Light::emitPhoton(), rcrt::Photon::getBounces(), rcrt::Photon::getDir(), rcrt::Material::getIOR(), rcrt::Photon::getPos(), rcrt::Photon::getPower(), rcrt::Scene::intersect(), rcrt::INVALID, maxBounces, rcrt::REFRACTED, rcrt::Material::scatterPhoton(), scene, rcrt::Photon::setDir(), rcrt::Ray::setLastIOR(), rcrt::Photon::setPower(), rcrt::SPECULAR, rcrt::STORE, and rcrt::RGBColor::sum().

Referenced by generate().

void rcrt::PhotonMap::generate ( const int &  noPhotons  ) 

Definition at line 24 of file PhotonMap.cpp.

References rcrt::PhotonKDTree::buildTree(), caustics, causticTree, generateJob(), rcrt::Scene::getLights(), rcrt::Photon::getPower(), globalTree, photons, scene, and rcrt::Photon::setWeight().

Referenced by testPhotonRCRT().

RGBColor rcrt::PhotonMap::getRadiance ( const Vec3D wOut,
const int &  noGPhotons,
const int &  noCPhotons,
Intersection is 
)

Definition at line 253 of file PhotonMap.cpp.

References causticTree, flat, rcrt::Photon::getDir(), rcrt::PhotonKDTree::getKNearest(), rcrt::Primitive::getMaterial(), rcrt::Intersection::getPosition(), rcrt::Photon::getPower(), rcrt::Intersection::getPrimitive(), rcrt::Material::getShadingNormal(), rcrt::Photon::getWeight(), globalTree, maxRadius, and rcrt::Material::sample().

Referenced by rcrt::PhotonTracer::trace().

const float & rcrt::PhotonMap::getMaxRadius (  )  const

Definition at line 313 of file PhotonMap.cpp.

References maxRadius.


Member Data Documentation

Scene* rcrt::PhotonMap::scene [private]

Definition at line 17 of file PhotonMap.h.

Referenced by generate(), and generateJob().

std::vector<Photon*> rcrt::PhotonMap::photons [private]

Definition at line 18 of file PhotonMap.h.

Referenced by generate(), and ~PhotonMap().

std::vector<Photon*> rcrt::PhotonMap::caustics [private]

Definition at line 19 of file PhotonMap.h.

Referenced by generate().

PhotonKDTree rcrt::PhotonMap::globalTree [private]

Definition at line 20 of file PhotonMap.h.

Referenced by generate(), and getRadiance().

PhotonKDTree rcrt::PhotonMap::causticTree [private]

Definition at line 21 of file PhotonMap.h.

Referenced by generate(), and getRadiance().

float rcrt::PhotonMap::maxRadius [private]

Definition at line 22 of file PhotonMap.h.

Referenced by getMaxRadius(), and getRadiance().

int rcrt::PhotonMap::maxBounces [private]

Definition at line 23 of file PhotonMap.h.

Referenced by generateJob().

float rcrt::PhotonMap::currentRadius [private]

Definition at line 24 of file PhotonMap.h.

float rcrt::PhotonMap::flat [private]

Definition at line 25 of file PhotonMap.h.

Referenced by getRadiance().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:24 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3