#include <bgportallight.h>


Public Member Functions | |
| bgPortalLight_t (unsigned int msh, int sampl) | |
| virtual | ~bgPortalLight_t () |
| virtual void | init (scene_t &scene) |
| allow for preprocessing when scene loading has finished | |
| virtual color_t | totalEnergy () const |
| total energy emmitted during whole frame | |
| virtual color_t | emitPhoton (float s1, float s2, float s3, float s4, ray_t &ray, float &ipdf) const |
| emit a photon | |
| virtual color_t | emitSample (vector3d_t &wo, lSample_t &s) const |
| create a sample of light emission, similar to emitPhoton, just more suited for bidirectional methods | |
| virtual bool | diracLight () const |
| indicate whether the light has a dirac delta distribution or not | |
| virtual bool | illumSample (const surfacePoint_t &sp, float s1, float s2, color_t &col, float &ipdf, ray_t &wi) const |
| virtual bool | illumSample (const surfacePoint_t &sp, lSample_t &s, ray_t &wi) const |
| illuminate a given surface point, generating sample s, fill in s.sp if not NULL; Set ray to test visibility by integrator | |
| virtual bool | illuminate (const surfacePoint_t &sp, color_t &col, ray_t &wi) const |
| illuminate a given surfance point; Set ray to test visibility by integrator. Only for dirac lights. | |
| virtual int | nSamples () const |
| virtual bool | canIntersect () const |
| indicate whether the light can intersect with a ray (by the intersect function) | |
| virtual bool | intersect (const ray_t &ray, PFLOAT &t, color_t &col, float &ipdf) const |
| intersect the light source with a ray, giving back distance, energy and 1/PDF | |
| virtual float | illumPdf (const surfacePoint_t &sp, const surfacePoint_t &sp_light) const |
| get the pdf for sampling the incoming direction wi at surface point sp (illumSample!) | |
| virtual void | emitPdf (const surfacePoint_t &sp, const vector3d_t &wi, float &areaPdf, float &dirPdf, float &cos_wo) const |
| get the pdf values for sampling point sp on the light and outgoing direction wo when emitting energy (emitSample, NOT illumSample) | |
Static Public Member Functions | |
| static light_t * | factory (paraMap_t ¶ms, renderEnvironment_t &render) |
Protected Member Functions | |
| void | initIS () |
| void | sampleSurface (point3d_t &p, vector3d_t &n, float u, float v) const |
Protected Attributes | |
| unsigned int | objID |
| pdf1D_t * | areaDist |
| const triangle_t ** | tris |
| int | samples |
| int | nTris |
| gives the array size of uDist | |
| float | area |
| float | invArea |
| triangleObject_t * | mesh |
| triKdTree_t * | tree |
| background_t * | bg |
| point3d_t | worldCenter |
| int * | stats |
Definition at line 36 of file bgportallight.h.
| __BEGIN_YAFRAY bgPortalLight_t::bgPortalLight_t | ( | unsigned int | msh, | |
| int | sampl | |||
| ) |
Definition at line 32 of file bgportallight.cc.
| bgPortalLight_t::~bgPortalLight_t | ( | ) | [virtual] |
Definition at line 39 of file bgportallight.cc.
| virtual bool bgPortalLight_t::canIntersect | ( | ) | const [inline, virtual] |
indicate whether the light can intersect with a ray (by the intersect function)
Reimplemented from light_t.
Definition at line 50 of file bgportallight.h.
| virtual bool bgPortalLight_t::diracLight | ( | ) | const [inline, virtual] |
indicate whether the light has a dirac delta distribution or not
Implements light_t.
Definition at line 45 of file bgportallight.h.
| void bgPortalLight_t::emitPdf | ( | const surfacePoint_t & | sp, | |
| const vector3d_t & | wo, | |||
| float & | areaPdf, | |||
| float & | dirPdf, | |||
| float & | cos_wo | |||
| ) | const [virtual] |
get the pdf values for sampling point sp on the light and outgoing direction wo when emitting energy (emitSample, NOT illumSample)
Reimplemented from light_t.
Definition at line 232 of file bgportallight.cc.
| color_t bgPortalLight_t::emitSample | ( | vector3d_t & | wo, | |
| lSample_t & | s | |||
| ) | const [virtual] |
create a sample of light emission, similar to emitPhoton, just more suited for bidirectional methods
fill in s.dirPdf, s.areaPdf, s.col and s.flags, and s.sp if not NULL
Reimplemented from light_t.
Definition at line 187 of file bgportallight.cc.
| light_t * bgPortalLight_t::factory | ( | paraMap_t & | params, | |
| renderEnvironment_t & | render | |||
| ) | [static] |
Definition at line 241 of file bgportallight.cc.
| virtual bool bgPortalLight_t::illuminate | ( | const surfacePoint_t & | sp, | |
| color_t & | col, | |||
| ray_t & | wi | |||
| ) | const [inline, virtual] |
illuminate a given surfance point; Set ray to test visibility by integrator. Only for dirac lights.
Implements light_t.
Definition at line 48 of file bgportallight.h.
| float bgPortalLight_t::illumPdf | ( | const surfacePoint_t & | sp, | |
| const surfacePoint_t & | sp_light | |||
| ) | const [virtual] |
get the pdf for sampling the incoming direction wi at surface point sp (illumSample!)
this method requires an intersection point with the light (sp_light). Otherwise, use intersect()
Reimplemented from light_t.
Definition at line 224 of file bgportallight.cc.
| bool bgPortalLight_t::illumSample | ( | const surfacePoint_t & | sp, | |
| lSample_t & | s, | |||
| ray_t & | wi | |||
| ) | const [virtual] |
illuminate a given surface point, generating sample s, fill in s.sp if not NULL; Set ray to test visibility by integrator
fill in s.pdf, s.col and s.flags
Implements light_t.
Definition at line 143 of file bgportallight.cc.
| bool bgPortalLight_t::illumSample | ( | const surfacePoint_t & | sp, | |
| float | s1, | |||
| float | s2, | |||
| color_t & | col, | |||
| float & | ipdf, | |||
| ray_t & | wi | |||
| ) | const [virtual] |
Definition at line 116 of file bgportallight.cc.
| void bgPortalLight_t::init | ( | scene_t & | scene | ) | [virtual] |
allow for preprocessing when scene loading has finished
Reimplemented from light_t.
Definition at line 68 of file bgportallight.cc.
| void bgPortalLight_t::initIS | ( | ) | [protected] |
Definition at line 47 of file bgportallight.cc.
| bool bgPortalLight_t::intersect | ( | const ray_t & | ray, | |
| PFLOAT & | t, | |||
| color_t & | col, | |||
| float & | ipdf | |||
| ) | const [virtual] |
intersect the light source with a ray, giving back distance, energy and 1/PDF
Reimplemented from light_t.
Definition at line 203 of file bgportallight.cc.
| virtual int bgPortalLight_t::nSamples | ( | ) | const [inline, virtual] |
Reimplemented from light_t.
Definition at line 49 of file bgportallight.h.
| void bgPortalLight_t::sampleSurface | ( | point3d_t & | p, | |
| vector3d_t & | n, | |||
| float | u, | |||
| float | v | |||
| ) | const [protected] |
Definition at line 81 of file bgportallight.cc.
| color_t bgPortalLight_t::totalEnergy | ( | ) | const [virtual] |
total energy emmitted during whole frame
Implements light_t.
Definition at line 97 of file bgportallight.cc.
float bgPortalLight_t::area [protected] |
Definition at line 64 of file bgportallight.h.
pdf1D_t* bgPortalLight_t::areaDist [protected] |
Definition at line 60 of file bgportallight.h.
background_t* bgPortalLight_t::bg [protected] |
Definition at line 67 of file bgportallight.h.
float bgPortalLight_t::invArea [protected] |
Definition at line 64 of file bgportallight.h.
triangleObject_t* bgPortalLight_t::mesh [protected] |
Definition at line 65 of file bgportallight.h.
int bgPortalLight_t::nTris [protected] |
gives the array size of uDist
Definition at line 63 of file bgportallight.h.
unsigned int bgPortalLight_t::objID [protected] |
Definition at line 59 of file bgportallight.h.
int bgPortalLight_t::samples [protected] |
Definition at line 62 of file bgportallight.h.
int* bgPortalLight_t::stats [protected] |
Definition at line 70 of file bgportallight.h.
triKdTree_t* bgPortalLight_t::tree [protected] |
Definition at line 66 of file bgportallight.h.
const triangle_t** bgPortalLight_t::tris [protected] |
Definition at line 61 of file bgportallight.h.
point3d_t bgPortalLight_t::worldCenter [protected] |
Definition at line 68 of file bgportallight.h.
1.6.1