#include <PhotonKDTree.h>
Public Member Functions | |
PhotonKDTree (const float &maxSqrRadius) | |
virtual | ~PhotonKDTree () |
void | buildTree (std::vector< Photon * > *phots) |
void | getKNearest (std::vector< PKDSearchP > *result, const unsigned int &k, const Point3D &pos, const Vec3D &normal, const float &radiusSqr, const float &flat) const |
Static Private Member Functions | |
static bool | splitPlaneCompare (PKDSplitPlane *a, PKDSplitPlane *b) |
Private Attributes | |
std::vector< Photon * > * | photons |
float | maxSqrRadius |
PKDNode * | root |
bool | empty |
Definition at line 10 of file PhotonKDTree.h.
rcrt::PhotonKDTree::PhotonKDTree | ( | const float & | maxSqrRadius | ) |
Definition at line 11 of file PhotonKDTree.cpp.
rcrt::PhotonKDTree::~PhotonKDTree | ( | ) | [virtual] |
bool rcrt::PhotonKDTree::splitPlaneCompare | ( | PKDSplitPlane * | a, | |
PKDSplitPlane * | b | |||
) | [static, private] |
Definition at line 21 of file PhotonKDTree.cpp.
References rcrt::PKDSplitPlane::axis, rcrt::Photon::getPos(), and rcrt::PKDSplitPlane::p.
Referenced by buildTree().
void rcrt::PhotonKDTree::buildTree | ( | std::vector< Photon * > * | phots | ) |
Definition at line 26 of file PhotonKDTree.cpp.
References empty, maxSqrRadius, photons, root, splitPlaneCompare(), X_AXIS, Y_AXIS, and Z_AXIS.
Referenced by rcrt::PhotonMap::generate().
void rcrt::PhotonKDTree::getKNearest | ( | std::vector< PKDSearchP > * | result, | |
const unsigned int & | k, | |||
const Point3D & | pos, | |||
const Vec3D & | normal, | |||
const float & | radiusSqr, | |||
const float & | flat | |||
) | const |
Definition at line 73 of file PhotonKDTree.cpp.
References empty, rcrt::PKDNode::getKNearest(), and root.
Referenced by rcrt::PhotonMap::getRadiance().
std::vector<Photon*>* rcrt::PhotonKDTree::photons [private] |
float rcrt::PhotonKDTree::maxSqrRadius [private] |
PKDNode* rcrt::PhotonKDTree::root [private] |
Definition at line 15 of file PhotonKDTree.h.
Referenced by buildTree(), getKNearest(), and ~PhotonKDTree().
bool rcrt::PhotonKDTree::empty [private] |