#include <PhotonMap.h>
Public Member Functions | |
PhotonMap () | |
PhotonMap (const vector< Photon > &photons) | |
virtual | ~PhotonMap () |
virtual void | set (const vector< Photon > &photons) |
virtual unsigned | numPhotons (void) const |
virtual vector< Photon * > * | getNeighbourhood (const Vector3 &spoint, const Vector3 *snormal, float maxdist, unsigned nphotons) const |
virtual bool | getIrradiance (const Vector3 &spoint, const Vector3 *snormal, float maxdist, unsigned nphotons, Vector3 &irrad) const |
virtual PhotonsIterator * | iterator () const |
Protected Member Functions | |
void | _build (const vector< Photon > &) |
declaration | |
void | _median_split (Photon **, int, int, int, const int) |
void | _balance_segment (Photon **, Photon **, int, int, int) |
void | _locate_photons (NearestPhotons *const, unsigned) const |
Protected Attributes | |
Photon * | _map |
compact kd-tree with photons | |
unsigned | _storedPhotons |
number of photons in kd-tree | |
float | _bboxMin [3] |
bounding box of the scene | |
float | _bboxMax [3] |
Friends | |
class | Iterator |
Classes | |
class | Iterator |
class | NearestPhotons |
Definition at line 21 of file PhotonMap.h.
|
Implicit constructor creating empty map, see set() method. Definition at line 263 of file PhotonMap.cc. References PhotonMap::_bboxMax, and PhotonMap::_bboxMin. |
|
Constructor.
Definition at line 270 of file PhotonMap.cc. References PhotonMap::_build(). |
|
Destructor. Definition at line 276 of file PhotonMap.cc. References PhotonMap::_map. |
|
Definition at line 109 of file PhotonMap.cc. References PhotonMap::_bboxMax, PhotonMap::_bboxMin, PhotonMap::_median_split(), Photon::_plane, and Photon::_position. |
|
declaration
Definition at line 7 of file PhotonMap.cc. References PhotonMap::_bboxMax, PhotonMap::_bboxMin, PhotonMap::_map, and PhotonMap::_storedPhotons. Referenced by PhotonMap::PhotonMap(), and PhotonMap::set(). |
|
Definition at line 175 of file PhotonMap.cc. References Photon::_plane, Photon::_position, PhotonMap::NearestPhotons::dist2, PhotonMap::NearestPhotons::found, PhotonMap::NearestPhotons::gotHeap, PhotonMap::NearestPhotons::index, PhotonMap::NearestPhotons::max, PhotonMap::NearestPhotons::photons, and PhotonMap::NearestPhotons::pos. Referenced by PhotonMap::getIrradiance(), and PhotonMap::getNeighbourhood(). |
|
Definition at line 83 of file PhotonMap.cc. References Photon::_position, and swap. Referenced by PhotonMap::_balance_segment(). |
|
Finds and returns average irradiance of photons from the closest neighbourhood of given point.
Definition at line 321 of file PhotonMap.cc. References PhotonMap::_locate_photons(), PhotonMap::_map, PhotonMap::_storedPhotons, PhotonMap::NearestPhotons::found, and PhotonMap::NearestPhotons::numPhotons(). |
|
Finds and returns the closes photons from the neightbourhood of a surface point.
Definition at line 292 of file PhotonMap.cc. References PhotonMap::_locate_photons(), PhotonMap::_map, PhotonMap::_storedPhotons, PhotonMap::NearestPhotons::found, and PhotonMap::NearestPhotons::numPhotons(). |
|
Definition at line 132 of file PhotonMap.h. References esg::Iterator. |
|
Definition at line 287 of file PhotonMap.cc. References PhotonMap::_storedPhotons. |
|
Deletes old photons and builds new map from given photons.
Definition at line 281 of file PhotonMap.cc. References PhotonMap::_build(), and PhotonMap::_map. |
|
Definition at line 22 of file PhotonMap.h. |
|
Definition at line 52 of file PhotonMap.h. Referenced by PhotonMap::_balance_segment(), PhotonMap::_build(), and PhotonMap::PhotonMap(). |
|
bounding box of the scene
Definition at line 51 of file PhotonMap.h. Referenced by PhotonMap::_balance_segment(), PhotonMap::_build(), and PhotonMap::PhotonMap(). |
|
compact kd-tree with photons
Definition at line 49 of file PhotonMap.h. Referenced by PhotonMap::_build(), PhotonMap::getIrradiance(), PhotonMap::getNeighbourhood(), PhotonMap::set(), and PhotonMap::~PhotonMap(). |
|
number of photons in kd-tree
Definition at line 50 of file PhotonMap.h. Referenced by PhotonMap::_build(), PhotonMap::getIrradiance(), PhotonMap::getNeighbourhood(), and PhotonMap::numPhotons(). |