#include <reflection.h>
Public Member Functions | |
Spectrum | Sample_f (const Vector &wo, Vector *wi, const BSDFSample &bsdfSample, float *pdf, BxDFType flags=BSDF_ALL, BxDFType *sampledType=NULL) const |
float | Pdf (const Vector &wo, const Vector &wi, BxDFType flags=BSDF_ALL) const |
BSDF (const DifferentialGeometry &dgs, const Normal &ngeom, float eta=1.f) | |
void | Add (BxDF *bxdf) |
int | NumComponents () const |
int | NumComponents (BxDFType flags) const |
Vector | WorldToLocal (const Vector &v) const |
Vector | LocalToWorld (const Vector &v) const |
Spectrum | f (const Vector &woW, const Vector &wiW, BxDFType flags=BSDF_ALL) const |
Spectrum | rho (RNG &rng, BxDFType flags=BSDF_ALL, int sqrtSamples=6) const |
Spectrum | rho (const Vector &wo, RNG &rng, BxDFType flags=BSDF_ALL, int sqrtSamples=6) const |
Public Attributes | |
const DifferentialGeometry | dgShading |
const float | eta |
Private Member Functions | |
~BSDF () | |
Private Attributes | |
Normal | nn |
Normal | ng |
Vector | sn |
Vector | tn |
int | nBxDFs |
BxDF * | bxdfs [MAX_BxDFS] |
Friends | |
class | MixMaterial |
Definition at line 146 of file reflection.h.
BSDF::BSDF | ( | const DifferentialGeometry & | dgs, | |
const Normal & | ngeom, | |||
float | eta = 1.f | |||
) |
Definition at line 587 of file reflection.cpp.
References Cross(), dgShading, DifferentialGeometry::dpdu, nBxDFs, ng, DifferentialGeometry::nn, nn, Normalize(), sn, and tn.
BSDF::~BSDF | ( | ) | [inline, private] |
Definition at line 178 of file reflection.h.
void BSDF::Add | ( | BxDF * | bxdf | ) | [inline] |
Definition at line 519 of file reflection.h.
References Assert, bxdfs, MAX_BxDFS, and nBxDFs.
Referenced by createAniso0_0(), createAniso10_10(), createAniso30_30(), createBlinn0(), createBlinn05(), createBlinn2(), createBlinn30and0(), createFresnelBlend0(), createFresnelBlend30(), createLambertian(), createOrenNayar0(), createOrenNayar20(), createPlastic(), createSubstrate(), UberMaterial::GetBSDF(), TranslucentMaterial::GetBSDF(), SubsurfaceMaterial::GetBSDF(), SubstrateMaterial::GetBSDF(), PlasticMaterial::GetBSDF(), MixMaterial::GetBSDF(), MirrorMaterial::GetBSDF(), MetalMaterial::GetBSDF(), MeasuredMaterial::GetBSDF(), MatteMaterial::GetBSDF(), KdSubsurfaceMaterial::GetBSDF(), GlassMaterial::GetBSDF(), and SHComputeBSDFMatrix().
Definition at line 598 of file reflection.cpp.
References BSDF_REFLECTION, BSDF_TRANSMISSION, bxdfs, Dot(), BxDF::f(), nBxDFs, ng, and WorldToLocal().
Referenced by EstimateDirect(), Gen_CosHemisphere(), Gen_UniformHemisphere(), TranslucentMaterial::GetBSDF(), IrradianceCacheIntegrator::indirectLo(), MetropolisRenderer::Lbidir(), WhittedIntegrator::Li(), PhotonIntegrator::Li(), IGIIntegrator::Li(), LPhoton(), Sample_f(), and SHComputeBSDFMatrix().
Definition at line 162 of file reflection.h.
References nn, sn, tn, Normal::x, Vector::x, Normal::y, Vector::y, Normal::z, and Vector::z.
Referenced by Gen_CosHemisphere(), Gen_UniformHemisphere(), IrradianceCacheIntegrator::indirectLo(), GlossyPRTIntegrator::Li(), main(), and Sample_f().
int BSDF::NumComponents | ( | BxDFType | flags | ) | const [inline] |
Definition at line 525 of file reflection.h.
int BSDF::NumComponents | ( | ) | const [inline] |
Definition at line 157 of file reflection.h.
References nBxDFs.
Referenced by GeneratePath(), MixMaterial::GetBSDF(), IrradianceCacheIntegrator::indirectLo(), PhotonIntegrator::Li(), LPhoton(), PhotonShootingTask::Run(), and Sample_f().
Definition at line 569 of file reflection.cpp.
References bxdfs, nBxDFs, BxDF::Pdf(), and WorldToLocal().
Referenced by EstimateDirect(), Gen_Sample_f(), and PhotonIntegrator::Li().
Spectrum BSDF::rho | ( | const Vector & | wo, | |
RNG & | rng, | |||
BxDFType | flags = BSDF_ALL , |
|||
int | sqrtSamples = 6 | |||
) | const |
Definition at line 630 of file reflection.cpp.
References ALLOCA, bxdfs, nBxDFs, BxDF::rho(), and StratifiedSample2D().
Definition at line 615 of file reflection.cpp.
References ALLOCA, bxdfs, nBxDFs, BxDF::rho(), and StratifiedSample2D().
Referenced by UseRadianceProbes::Li(), DiffusePRTIntegrator::Li(), LPhoton(), IGIIntegrator::Preprocess(), and PhotonShootingTask::Run().
Spectrum BSDF::Sample_f | ( | const Vector & | wo, | |
Vector * | wi, | |||
const BSDFSample & | bsdfSample, | |||
float * | pdf, | |||
BxDFType | flags = BSDF_ALL , |
|||
BxDFType * | sampledType = NULL | |||
) | const |
Definition at line 508 of file reflection.cpp.
References Assert, BSDF_REFLECTION, BSDF_SPECULAR, BSDF_TRANSMISSION, bxdfs, Dot(), BxDF::f(), f(), Floor2Int(), LocalToWorld(), nBxDFs, ng, NumComponents(), BxDF::Pdf(), BxDF::Sample_f(), BxDF::type, BSDFSample::uComponent, BSDFSample::uDir, and WorldToLocal().
Referenced by EstimateDirect(), Gen_Sample_f(), GeneratePath(), PhotonIntegrator::Li(), PathIntegrator::Li(), IGIIntegrator::Li(), GlossyPRTIntegrator::Li(), IrradianceCacheIntegrator::pathL(), IGIIntegrator::Preprocess(), PhotonShootingTask::Run(), SpecularReflect(), and SpecularTransmit().
Definition at line 159 of file reflection.h.
References Dot(), nn, sn, and tn.
Referenced by f(), Gen_Sample_f(), GlossyPRTIntegrator::Li(), main(), Pdf(), and Sample_f().
friend class MixMaterial [friend] |
Definition at line 186 of file reflection.h.
BxDF* BSDF::bxdfs[MAX_BxDFS] [private] |
Definition at line 185 of file reflection.h.
Referenced by Add(), f(), MixMaterial::GetBSDF(), NumComponents(), Pdf(), rho(), and Sample_f().
Definition at line 174 of file reflection.h.
Referenced by BSDF(), GeneratePath(), MetropolisRenderer::Lbidir(), WhittedIntegrator::Li(), UseRadianceProbes::Li(), PhotonIntegrator::Li(), PathIntegrator::Li(), IrradianceCacheIntegrator::Li(), IGIIntegrator::Li(), GlossyPRTIntegrator::Li(), DirectLightingIntegrator::Li(), DipoleSubsurfaceIntegrator::Li(), DiffusePRTIntegrator::Li(), AmbientOcclusionIntegrator::Li(), MetropolisRenderer::Lpath(), LPhoton(), main(), IrradianceCacheIntegrator::pathL(), IGIIntegrator::Preprocess(), PhotonShootingTask::Run(), SpecularReflect(), and SpecularTransmit().
const float BSDF::eta |
Definition at line 175 of file reflection.h.
Referenced by SpecularTransmit().
int BSDF::nBxDFs [private] |
Definition at line 183 of file reflection.h.
Referenced by Add(), BSDF(), f(), NumComponents(), Pdf(), rho(), and Sample_f().
Definition at line 181 of file reflection.h.
Referenced by BSDF(), f(), and Sample_f().
Definition at line 181 of file reflection.h.
Referenced by BSDF(), LocalToWorld(), and WorldToLocal().
Definition at line 182 of file reflection.h.
Referenced by BSDF(), LocalToWorld(), and WorldToLocal().
Definition at line 182 of file reflection.h.
Referenced by BSDF(), LocalToWorld(), and WorldToLocal().