#include <stdio.h>#include <stdlib.h>#include "pbrt.h"#include "reflection.h"#include "montecarlo.h"#include "memory.h"#include "api.h"#include "paramset.h"#include "shapes/disk.h"Go to the source code of this file.
| Typedefs | |
| typedef void(* | CreateBSDFFunc )(BSDF *bsdf) | 
| typedef void(* | GenSampleFunc )(BSDF *bsdf, const Vector &wo, Vector *wi, float *pdf, Spectrum *f) | 
| Functions | |
| double | spectrumRedValue (const Spectrum &s) | 
| void | createBlinn0 (BSDF *bsdf) | 
| void | createBlinn05 (BSDF *bsdf) | 
| void | createBlinn2 (BSDF *bsdf) | 
| void | createBlinn30and0 (BSDF *bsdf) | 
| void | createAniso0_0 (BSDF *bsdf) | 
| void | createAniso10_10 (BSDF *bsdf) | 
| void | createAniso30_30 (BSDF *bsdf) | 
| void | createLambertian (BSDF *bsdf) | 
| void | createOrenNayar0 (BSDF *bsdf) | 
| void | createOrenNayar20 (BSDF *bsdf) | 
| void | createFresnelBlend0 (BSDF *bsdf) | 
| void | createFresnelBlend30 (BSDF *bsdf) | 
| void | createPlastic (BSDF *bsdf) | 
| void | createSubstrate (BSDF *bsdf) | 
| void | Gen_Sample_f (BSDF *bsdf, const Vector &wo, Vector *wi, float *pdf, Spectrum *f) | 
| void | Gen_CosHemisphere (BSDF *bsdf, const Vector &wo, Vector *wi, float *pdf, Spectrum *f) | 
| void | Gen_UniformHemisphere (BSDF *bsdf, const Vector &wo, Vector *wi, float *pdf, Spectrum *f) | 
| int | main (int argc, char *argv[]) | 
| Variables | |
| static MemoryArena | arena | 
| static RNG | rng | 
| typedef void(* CreateBSDFFunc)(BSDF *bsdf) | 
Definition at line 23 of file bsdftest.cpp.
| typedef void(* GenSampleFunc)(BSDF *bsdf, const Vector &wo, Vector *wi, float *pdf, Spectrum *f) | 
Definition at line 41 of file bsdftest.cpp.
| void createAniso0_0 | ( | BSDF * | bsdf | ) | 
Definition at line 379 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createAniso10_10 | ( | BSDF * | bsdf | ) | 
Definition at line 392 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createAniso30_30 | ( | BSDF * | bsdf | ) | 
Definition at line 404 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createBlinn0 | ( | BSDF * | bsdf | ) | 
Definition at line 330 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createBlinn05 | ( | BSDF * | bsdf | ) | 
Definition at line 341 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createBlinn2 | ( | BSDF * | bsdf | ) | 
Definition at line 352 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createBlinn30and0 | ( | BSDF * | bsdf | ) | 
Definition at line 363 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Referenced by main().
| void createFresnelBlend0 | ( | BSDF * | bsdf | ) | 
Definition at line 443 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
| void createFresnelBlend30 | ( | BSDF * | bsdf | ) | 
Definition at line 455 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
| void createLambertian | ( | BSDF * | bsdf | ) | 
Definition at line 417 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
| void createOrenNayar0 | ( | BSDF * | bsdf | ) | 
Definition at line 425 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
| void createOrenNayar20 | ( | BSDF * | bsdf | ) | 
Definition at line 434 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
| void createPlastic | ( | BSDF * | bsdf | ) | 
Definition at line 467 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
| void createSubstrate | ( | BSDF * | bsdf | ) | 
Definition at line 484 of file bsdftest.cpp.
References BSDF::Add(), and BSDF_ALLOC.
Definition at line 297 of file bsdftest.cpp.
References CosineHemispherePdf(), CosineSampleHemisphere(), BSDF::f(), BSDF::LocalToWorld(), RNG::RandomFloat(), and Vector::z.
Referenced by main().
Definition at line 270 of file bsdftest.cpp.
References BSDF_DIFFUSE, BSDF_GLOSSY, BSDF_REFLECTION, BSDF::Pdf(), BSDF::Sample_f(), BSDF::WorldToLocal(), and Vector::z.
Referenced by main().
| void Gen_UniformHemisphere | ( | BSDF * | bsdf, | |
| const Vector & | wo, | |||
| Vector * | wi, | |||
| float * | pdf, | |||
| Spectrum * | f | |||
| ) | 
Definition at line 310 of file bsdftest.cpp.
References BSDF::f(), BSDF::LocalToWorld(), RNG::RandomFloat(), UniformHemispherePdf(), and UniformSampleHemisphere().
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) | 
Definition at line 52 of file bsdftest.cpp.
References AbsDot(), BSDF_ALLOC, Clamp(), createAniso0_0(), createAniso10_10(), createAniso30_30(), createBlinn0(), createBlinn05(), createBlinn2(), createBlinn30and0(), BSDF::dgShading, Gen_CosHemisphere(), Gen_Sample_f(), INFINITY, Inverse(), BSDF::LocalToWorld(), M_PI, DifferentialGeometry::nn, Normalize(), pbrtCleanup(), pbrtInit(), RotateX(), spectrumRedValue(), BSDF::WorldToLocal(), Vector::x, Vector::y, and Vector::z.
| double spectrumRedValue | ( | const Spectrum & | s | ) | 
Definition at line 18 of file bsdftest.cpp.
Referenced by main().
| MemoryArena arena  [static] | 
Definition at line 14 of file bsdftest.cpp.
Referenced by KdAccelNode::initInterior(), IGIIntegrator::Preprocess(), GlossyPRTIntegrator::Preprocess(), DipoleSubsurfaceIntegrator::Preprocess(), DiffusePRTIntegrator::Preprocess(), LoopSubdiv::Refine(), MetropolisRenderer::Render(), SurfacePointTask::Run(), SamplerRendererTask::Run(), PhotonShootingTask::Run(), MLTTask::Run(), IrradiancePrimeTask::Run(), CreateRadProbeTask::Run(), SHComputeBSDFMatrix(), and SHProjectIncidentIndirectRadiance().
Definition at line 15 of file bsdftest.cpp.
Referenced by IGIIntegrator::Preprocess(), GlossyPRTIntegrator::Preprocess(), DipoleSubsurfaceIntegrator::Preprocess(), DiffusePRTIntegrator::Preprocess(), RandomSampler::RandomSampler(), MetropolisRenderer::Render(), CreateRadianceProbes::Render(), AggregateTest::Render(), SurfacePointTask::Run(), SamplerRendererTask::Run(), PhotonShootingTask::Run(), MLTTask::Run(), IrradiancePrimeTask::Run(), and CreateRadProbeTask::Run().
 1.6.3
 1.6.3