#include <AreaLightSampler.h>
Public Member Functions | |
AreaLightSampler (AreaLight *l) | |
~AreaLightSampler () | |
void | sample (const Point3D &p, const Vec3D &no, std::vector< LightSample > &samples, const int &maxSamples, Scene *scene) |
Private Member Functions | |
void | subdivide (LSTreeLeaf *leaf, std::vector< LightSample > &samples, const Point3D &p, const Vec3D &no, Scene *scene) |
Private Attributes | |
AreaLight * | light |
LSTreeNode * | root |
Definition at line 145 of file AreaLightSampler.h.
rcrt::AreaLightSampler::AreaLightSampler | ( | AreaLight * | l | ) |
Definition at line 196 of file AreaLightSampler.cpp.
rcrt::AreaLightSampler::~AreaLightSampler | ( | ) | [inline] |
void rcrt::AreaLightSampler::subdivide | ( | LSTreeLeaf * | leaf, | |
std::vector< LightSample > & | samples, | |||
const Point3D & | p, | |||
const Vec3D & | no, | |||
Scene * | scene | |||
) | [private] |
Definition at line 201 of file AreaLightSampler.cpp.
References rcrt::LSTree::getParent(), rcrt::AreaLight::getSample(), rcrt::LSTreeNode::lc, light, rcrt::LSTree::parent, rcrt::LSTreeNode::rc, rcrt::LSTreeLeaf::sample, rcrt::LSTree::setWeight(), rcrt::LSTreeLeaf::setWeight(), rcrt::LSTreeNode::update(), rcrt::LSTreeLeaf::uvMax, rcrt::LSTreeLeaf::uvMin, rcrt::LSTreeLeaf::uvs, rcrt::LightSample::weight(), rcrt::Point2D::x(), and rcrt::Point2D::y().
Referenced by sample().
void rcrt::AreaLightSampler::sample | ( | const Point3D & | p, | |
const Vec3D & | no, | |||
std::vector< LightSample > & | samples, | |||
const int & | maxSamples, | |||
Scene * | scene | |||
) | [virtual] |
Implements rcrt::LightSampler.
Definition at line 264 of file AreaLightSampler.cpp.
References rcrt::RGBColor::b(), rcrt::AreaLight::base, rcrt::RGBColor::g(), rcrt::LSTreeNode::getMean(), rcrt::AreaLight::getSample(), rcrt::LSTreeNode::getSamples(), rcrt::LSTreeNode::lc, light, rcrt::RGBColor::r(), rcrt::LSTreeNode::rc, rcrt::LSTreeNode::refine(), root, rcrt::LightSample::setWeight(), rcrt::AreaLight::span1, rcrt::AreaLight::span2, subdivide(), and rcrt::LSTreeNode::update().
AreaLight* rcrt::AreaLightSampler::light [private] |
LSTreeNode* rcrt::AreaLightSampler::root [private] |