rcrt::AreaLightSampler Class Reference

#include <AreaLightSampler.h>

Inheritance diagram for rcrt::AreaLightSampler:

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

Collaboration graph
[legend]

List of all members.

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

AreaLightlight
LSTreeNoderoot


Detailed Description

Definition at line 145 of file AreaLightSampler.h.


Constructor & Destructor Documentation

rcrt::AreaLightSampler::AreaLightSampler ( AreaLight l  ) 

Definition at line 196 of file AreaLightSampler.cpp.

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

Definition at line 158 of file AreaLightSampler.h.

References root.


Member Function Documentation

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


Member Data Documentation

AreaLight* rcrt::AreaLightSampler::light [private]

Definition at line 148 of file AreaLightSampler.h.

Referenced by sample(), and subdivide().

LSTreeNode* rcrt::AreaLightSampler::root [private]

Definition at line 149 of file AreaLightSampler.h.

Referenced by sample(), and ~AreaLightSampler().


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