sh.h File Reference

#include "pbrt.h"
#include "geometry.h"
#include "spectrum.h"

Go to the source code of this file.

Functions

int SHTerms (int lmax)
int SHIndex (int l, int m)
void SHEvaluate (const Vector &v, int lmax, float *out)
void SHWriteImage (const char *filename, const Spectrum *c, int lmax, int yres)
template<typename Func >
void SHProjectCube (Func func, const Point &p, int res, int lmax, Spectrum *coeffs)
void SHProjectIncidentDirectRadiance (const Point &p, float pEpsilon, float time, MemoryArena &arena, const Scene *scene, bool computeLightVisibility, int lmax, RNG &rng, Spectrum *c_d)
void SHProjectIncidentIndirectRadiance (const Point &p, float pEpsilon, float time, const Renderer *renderer, Sample *origSample, const Scene *scene, int lmax, RNG &rng, int nSamples, Spectrum *c_i)
void SHReduceRinging (Spectrum *c, int lmax, float lambda=.005f)
void SHRotate (const Spectrum *c_in, Spectrum *c_out, const Matrix4x4 &m, int lmax, MemoryArena &arena)
void SHRotateZ (const Spectrum *c_in, Spectrum *c_out, float alpha, int lmax)
void SHRotateXMinus (const Spectrum *c_in, Spectrum *c_out, int lmax)
void SHRotateXPlus (const Spectrum *c_in, Spectrum *c_out, int lmax)
void SHConvolveCosTheta (int lmax, const Spectrum *c_in, Spectrum *c_out)
void SHConvolvePhong (int lmax, float n, const Spectrum *c_in, Spectrum *c_out)
void SHComputeDiffuseTransfer (const Point &p, const Normal &n, float rayEpsilon, const Scene *scene, RNG &rng, int nSamples, int lmax, Spectrum *c_transfer)
void SHComputeTransferMatrix (const Point &p, float rayEpsilon, const Scene *scene, RNG &rng, int nSamples, int lmax, Spectrum *T)
void SHComputeBSDFMatrix (const Spectrum &Kd, const Spectrum &Ks, float roughness, RNG &rng, int nSamples, int lmax, Spectrum *B)
void SHMatrixVectorMultiply (const Spectrum *M, const Spectrum *v, Spectrum *vout, int lmax)

Function Documentation

void SHComputeBSDFMatrix ( const Spectrum Kd,
const Spectrum Ks,
float  roughness,
RNG rng,
int  nSamples,
int  lmax,
Spectrum B 
)
void SHComputeDiffuseTransfer ( const Point p,
const Normal n,
float  rayEpsilon,
const Scene scene,
RNG rng,
int  nSamples,
int  lmax,
Spectrum c_transfer 
)
void SHComputeTransferMatrix ( const Point p,
float  rayEpsilon,
const Scene scene,
RNG rng,
int  nSamples,
int  lmax,
Spectrum T 
)
void SHConvolveCosTheta ( int  lmax,
const Spectrum c_in,
Spectrum c_out 
)

Definition at line 362 of file sh.cpp.

References lambda(), and SHIndex().

Referenced by UseRadianceProbes::Li().

void SHConvolvePhong ( int  lmax,
float  n,
const Spectrum c_in,
Spectrum c_out 
)

Definition at line 378 of file sh.cpp.

References lambda(), and SHIndex().

void SHEvaluate ( const Vector v,
int  lmax,
float *  out 
)
int SHIndex ( int  l,
int  m 
) [inline]
void SHMatrixVectorMultiply ( const Spectrum M,
const Spectrum v,
Spectrum vout,
int  lmax 
)

Definition at line 486 of file sh.cpp.

References SHTerms().

Referenced by GlossyPRTIntegrator::Li().

template<typename Func >
void SHProjectCube ( Func  func,
const Point p,
int  res,
int  lmax,
Spectrum coeffs 
) [inline]

Definition at line 50 of file sh.h.

References ALLOCA, Dot(), Normalize(), SHEvaluate(), and SHTerms().

Referenced by InfiniteAreaLight::SHProject().

void SHProjectIncidentDirectRadiance ( const Point p,
float  pEpsilon,
float  time,
MemoryArena arena,
const Scene scene,
bool  computeLightVisibility,
int  lmax,
RNG rng,
Spectrum c_d 
)
void SHProjectIncidentIndirectRadiance ( const Point p,
float  pEpsilon,
float  time,
const Renderer renderer,
Sample origSample,
const Scene scene,
int  lmax,
RNG rng,
int  nSamples,
Spectrum c_i 
)
void SHReduceRinging ( Spectrum c,
int  lmax,
float  lambda = .005f 
)

Definition at line 316 of file sh.cpp.

References SHIndex().

Referenced by SHProjectIncidentDirectRadiance().

void SHRotate ( const Spectrum c_in,
Spectrum c_out,
const Matrix4x4 m,
int  lmax,
MemoryArena arena 
)
void SHRotateXMinus ( const Spectrum c_in,
Spectrum c_out,
int  lmax 
)

Definition at line 30 of file shrots.cpp.

References SHIndex(), and SHRotateXPlus().

Referenced by SHRotate().

void SHRotateXPlus ( const Spectrum c_in,
Spectrum c_out,
int  lmax 
)

Definition at line 48 of file shrots.cpp.

References Assert, and O.

Referenced by SHRotate(), and SHRotateXMinus().

void SHRotateZ ( const Spectrum c_in,
Spectrum c_out,
float  alpha,
int  lmax 
)

Definition at line 338 of file sh.cpp.

References ALLOCA, Assert, SHIndex(), and sinCosIndexed().

Referenced by SHRotate().

int SHTerms ( int  lmax  )  [inline]
void SHWriteImage ( const char *  filename,
const Spectrum c,
int  lmax,
int  yres 
)
Generated on Sat Aug 28 20:00:12 2010 for pbrt by  doxygen 1.6.3