rcrt::LSTreeNode Class Reference

#include <AreaLightSampler.h>

Inheritance diagram for rcrt::LSTreeNode:

Inheritance graph
[legend]
Collaboration diagram for rcrt::LSTreeNode:

Collaboration graph
[legend]

List of all members.

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 ()
LSTreeLeafrefine ()
LSTreegetOtherChild (LSTree *c)
const RGBColorgetMean () const
const float & getWeight () const
void setWeight (const float &w)
virtual void getSamples (std::vector< LightSample > &samples) const
const RGBColorgetVariance () const

Protected Attributes

LSTreelc
LSTreerc
RGBColor mean
RGBColor variance
float weight
Point2D uvMin
Point2D uvMax

Friends

class LSTreeLeaf
class AreaLightSampler


Detailed Description

Definition at line 101 of file AreaLightSampler.h.


Constructor & Destructor Documentation

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 
)

Definition at line 58 of file AreaLightSampler.cpp.

References update().

rcrt::LSTreeNode::~LSTreeNode (  )  [inline]

Definition at line 118 of file AreaLightSampler.h.

References lc, and rc.


Member Function Documentation

void rcrt::LSTreeNode::setLeft ( LSTree l  ) 

Definition at line 64 of file AreaLightSampler.cpp.

References lc, and update().

void rcrt::LSTreeNode::setRight ( LSTree r  ) 

Definition at line 70 of file AreaLightSampler.cpp.

References rc, and update().

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().

LSTree * rcrt::LSTreeNode::getOtherChild ( LSTree c  ) 

Definition at line 160 of file AreaLightSampler.cpp.

References lc, and rc.

Referenced by refine().

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]

Implements rcrt::LSTree.

Definition at line 173 of file AreaLightSampler.cpp.

References weight.

void rcrt::LSTreeNode::setWeight ( const float &  w  )  [virtual]

Implements rcrt::LSTree.

Definition at line 178 of file AreaLightSampler.cpp.

References weight.

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]

Implements rcrt::LSTree.

Definition at line 189 of file AreaLightSampler.cpp.

References variance.


Friends And Related Function Documentation

friend class LSTreeLeaf [friend]

Definition at line 103 of file AreaLightSampler.h.

friend class AreaLightSampler [friend]

Reimplemented from rcrt::LSTree.

Definition at line 104 of file AreaLightSampler.h.


Member Data Documentation

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]

Definition at line 109 of file AreaLightSampler.h.

Referenced by getMean(), and update().

RGBColor rcrt::LSTreeNode::variance [protected]

Definition at line 110 of file AreaLightSampler.h.

Referenced by getVariance(), and update().

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.


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