#include <AreaLightSampler.h>
Public Member Functions | |
LSTreeNode (const Point2D &uvMi, const Point2D &uvMa, LSTreeNode *p=0) | |
LSTreeNode (LSTree *l, LSTree *r, LSTreeNode *p, const Point2D &uvMi, const Point2D &uvMa) | |
~LSTreeNode () | |
void | setLeft (LSTree *l) |
void | setRight (LSTree *r) |
void | update () |
LSTreeLeaf * | refine () |
LSTree * | getOtherChild (LSTree *c) |
const RGBColor & | getMean () const |
const float & | getWeight () const |
void | setWeight (const float &w) |
virtual void | getSamples (std::vector< LightSample > &samples) const |
const RGBColor & | getVariance () const |
Protected Attributes | |
LSTree * | lc |
LSTree * | rc |
RGBColor | mean |
RGBColor | variance |
float | weight |
Point2D | uvMin |
Point2D | uvMax |
Friends | |
class | LSTreeLeaf |
class | AreaLightSampler |
Definition at line 101 of file AreaLightSampler.h.
rcrt::LSTreeNode::LSTreeNode | ( | const Point2D & | uvMi, | |
const Point2D & | uvMa, | |||
LSTreeNode * | p = 0 | |||
) |
Definition at line 53 of file AreaLightSampler.cpp.
rcrt::LSTreeNode::LSTreeNode | ( | LSTree * | l, | |
LSTree * | r, | |||
LSTreeNode * | p, | |||
const Point2D & | uvMi, | |||
const Point2D & | uvMa | |||
) |
rcrt::LSTreeNode::~LSTreeNode | ( | ) | [inline] |
void rcrt::LSTreeNode::setLeft | ( | LSTree * | l | ) |
void rcrt::LSTreeNode::setRight | ( | LSTree * | r | ) |
void rcrt::LSTreeNode::update | ( | ) |
Definition at line 76 of file AreaLightSampler.cpp.
References rcrt::LSTree::getMean(), rcrt::LSTree::getSize(), rcrt::LSTree::getType(), rcrt::LSTree::getWeight(), lc, mean, rcrt::LSTree::parent, rcrt::PENUMBRA, rc, rcrt::LSTree::size, rcrt::LSTree::type, update(), variance, and weight.
Referenced by LSTreeNode(), rcrt::AreaLightSampler::sample(), setLeft(), setRight(), rcrt::AreaLightSampler::subdivide(), and update().
LSTreeLeaf * rcrt::LSTreeNode::refine | ( | ) | [virtual] |
Returns the leaf that needs subdivision.
Implements rcrt::LSTree.
Definition at line 101 of file AreaLightSampler.cpp.
References getOtherChild(), rcrt::LSTree::getSize(), rcrt::LSTree::getType(), rcrt::LSTree::isLeaf(), lc, rcrt::LSTree::parent, rcrt::PENUMBRA, rc, and rcrt::LSTree::refine().
Referenced by rcrt::AreaLightSampler::sample().
const RGBColor & rcrt::LSTreeNode::getMean | ( | ) | const [virtual] |
Implements rcrt::LSTree.
Definition at line 168 of file AreaLightSampler.cpp.
References mean.
Referenced by rcrt::AreaLightSampler::sample().
const float & rcrt::LSTreeNode::getWeight | ( | ) | const [virtual] |
void rcrt::LSTreeNode::setWeight | ( | const float & | w | ) | [virtual] |
void rcrt::LSTreeNode::getSamples | ( | std::vector< LightSample > & | samples | ) | const [virtual] |
Implements rcrt::LSTree.
Definition at line 183 of file AreaLightSampler.cpp.
References rcrt::LSTree::getSamples(), lc, and rc.
Referenced by rcrt::AreaLightSampler::sample().
const RGBColor & rcrt::LSTreeNode::getVariance | ( | ) | const [virtual] |
friend class LSTreeLeaf [friend] |
Definition at line 103 of file AreaLightSampler.h.
friend class AreaLightSampler [friend] |
LSTree* rcrt::LSTreeNode::lc [protected] |
Definition at line 107 of file AreaLightSampler.h.
Referenced by getOtherChild(), getSamples(), refine(), rcrt::AreaLightSampler::sample(), setLeft(), rcrt::AreaLightSampler::subdivide(), update(), and ~LSTreeNode().
LSTree* rcrt::LSTreeNode::rc [protected] |
Definition at line 108 of file AreaLightSampler.h.
Referenced by getOtherChild(), getSamples(), refine(), rcrt::AreaLightSampler::sample(), setRight(), rcrt::AreaLightSampler::subdivide(), update(), and ~LSTreeNode().
RGBColor rcrt::LSTreeNode::mean [protected] |
RGBColor rcrt::LSTreeNode::variance [protected] |
float rcrt::LSTreeNode::weight [protected] |
Definition at line 111 of file AreaLightSampler.h.
Referenced by getWeight(), setWeight(), and update().
Point2D rcrt::LSTreeNode::uvMin [protected] |
Definition at line 112 of file AreaLightSampler.h.
Point2D rcrt::LSTreeNode::uvMax [protected] |
Definition at line 113 of file AreaLightSampler.h.