#include <light.h>
Public Member Functions | |
ShapeSet (const Reference< Shape > &s) | |
float | Area () const |
~ShapeSet () | |
Point | Sample (const Point &p, const LightSample &ls, Normal *Ns) const |
Point | Sample (const LightSample &ls, Normal *Ns) const |
float | Pdf (const Point &p, const Vector &wi) const |
float | Pdf (const Point &p) const |
Private Attributes | |
vector< Reference< Shape > > | shapes |
float | sumArea |
vector< float > | areas |
Distribution1D * | areaDistribution |
Definition at line 134 of file light.h.
ShapeSet::~ShapeSet | ( | ) |
Definition at line 132 of file light.cpp.
References areaDistribution.
float ShapeSet::Area | ( | ) | const [inline] |
Definition at line 138 of file light.h.
References sumArea.
Referenced by DiffuseAreaLight::DiffuseAreaLight().
float ShapeSet::Pdf | ( | const Point & | p | ) | const |
Definition at line 159 of file light.cpp.
References areas, shapes, and sumArea.
Referenced by Pdf(), DiffuseAreaLight::Pdf(), and DiffuseAreaLight::Sample_L().
Point ShapeSet::Sample | ( | const LightSample & | ls, | |
Normal * | Ns | |||
) | const |
Definition at line 153 of file light.cpp.
References areaDistribution, Distribution1D::SampleDiscrete(), shapes, LightSample::uComponent, and LightSample::uPos.
Point ShapeSet::Sample | ( | const Point & | p, | |
const LightSample & | ls, | |||
Normal * | Ns | |||
) | const |
Definition at line 137 of file light.cpp.
References areaDistribution, INFINITY, DifferentialGeometry::nn, Distribution1D::SampleDiscrete(), shapes, LightSample::uComponent, and LightSample::uPos.
Referenced by DiffuseAreaLight::Sample_L().
Distribution1D* ShapeSet::areaDistribution [private] |
Definition at line 149 of file light.h.
Referenced by Sample(), ShapeSet(), and ~ShapeSet().
vector<float> ShapeSet::areas [private] |
Definition at line 148 of file light.h.
Referenced by Pdf(), and ShapeSet().
vector<Reference<Shape> > ShapeSet::shapes [private] |
Definition at line 146 of file light.h.
Referenced by Pdf(), Sample(), and ShapeSet().
float ShapeSet::sumArea [private] |
Definition at line 147 of file light.h.
Referenced by Area(), Pdf(), and ShapeSet().