pbrt.h File Reference

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include "error.h"
#include <malloc.h>
#include <alloca.h>
#include <assert.h>
#include <algorithm>

Go to the source code of this file.

Classes

struct  Options

Defines

#define _GNU_SOURCE   1
#define ALLOCA(TYPE, COUNT)   (TYPE *)alloca((COUNT) * sizeof(TYPE))
#define PBRT_VERSION   "2.0.0"
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define INV_FOURPI   0.07957747154594766788f
#define INFINITY   FLT_MAX
#define PBRT_L1_CACHE_LINE_SIZE   64
#define Assert(expr)

Typedefs

typedef RGBSpectrum Spectrum

Functions

float Lerp (float t, float v1, float v2)
float Clamp (float val, float low, float high)
int Clamp (int val, int low, int high)
int Mod (int a, int b)
float Radians (float deg)
float Degrees (float rad)
float Log2 (float x)
int Floor2Int (float val)
int Log2Int (float v)
bool IsPowerOf2 (int v)
uint32_t RoundUpPow2 (uint32_t v)
int Round2Int (float val)
int Float2Int (float val)
int Ceil2Int (float val)
bool Quadratic (float A, float B, float C, float *t0, float *t1)

Variables

Options PbrtOptions

Define Documentation

#define _GNU_SOURCE   1

Definition at line 46 of file pbrt.h.

#define ALLOCA ( TYPE,
COUNT   )     (TYPE *)alloca((COUNT) * sizeof(TYPE))
#define Assert ( expr   ) 
Value:
((expr) ? (void)0 : \
        Severe("Assertion \"%s\" failed in %s, line %d", \
               #expr, __FILE__, __LINE__))

Definition at line 286 of file pbrt.h.

Referenced by AbsDot(), BSDF::Add(), ParamSet::AddBlackbodySpectrum(), ParamSet::AddRGBSpectrum(), ParamSet::AddSampledSpectrum(), ParamSet::AddXYZSpectrum(), AverageSpectrumSamples(), BSDFSample::BSDFSample(), KdTreeAccel::buildTree(), BVHAccel::BVHAccel(), CoefficientSpectrum< 3 >::Clamp(), CoefficientSpectrum< 3 >::CoefficientSpectrum(), ComputeLightSamplingCDF(), Sampler::ComputeSubWindow(), CreateHeightfieldShape(), CreateNURBSShape(), Cross(), Dot(), RWMutexLock::DowngradeToRead(), EPhoton(), BVHAccel::flattenBVHTree(), RGBSpectrum::FromRGB(), GridAccel::GridAccel(), InterpolateSpectrumSamples(), Voxel::Intersect(), Voxel::IntersectP(), KnotOffset(), legendrep(), SamplerRenderer::Li(), PhotonIntegrator::Li(), EmissionIntegrator::Li(), CreateRadianceProbes::Li(), LightSample::LightSample(), MakeCamera(), MeasuredMaterial::MeasuredMaterial(), MetropolisRenderer::MetropolisRenderer(), mutate(), Normal::Normal(), NumSystemCores(), NURBSEvaluate(), NURBSEvaluateSurface(), Transform::operator()(), CompareToBucket::operator()(), CoefficientSpectrum< 3 >::operator*(), operator*(), CoefficientSpectrum< 3 >::operator*=(), Vector::operator*=(), CoefficientSpectrum< 3 >::operator+(), Normal::operator+(), Point::operator+(), Vector::operator+(), CoefficientSpectrum< 3 >::operator+=(), Normal::operator+=(), Point::operator+=(), Vector::operator+=(), CoefficientSpectrum< 3 >::operator-(), Normal::operator-(), Point::operator-(), Vector::operator-(), Normal::operator-=(), Point::operator-=(), Vector::operator-=(), CoefficientSpectrum< 3 >::operator/(), Normal::operator/(), Vector::operator/(), CoefficientSpectrum< 3 >::operator/=(), Normal::operator/=(), Vector::operator/=(), Normal::operator=(), Point::operator=(), Vector::operator=(), BBox::operator[](), Normal::operator[](), Point::operator[](), Vector::operator[](), TransformSet::operator[](), pbrtObjectInstance(), pbrtShape(), Point::Point(), Pow(), RdToAlphap(), ReadFloatFile(), ReadImageTGA(), BVHAccel::recursiveBuild(), MetropolisRenderer::Render(), MIPMap< RGBSpectrum >::resampleWeights(), ComputeRadianceTask::Run(), MLTTask::Run(), CreateRadProbeTask::Run(), BSDF::Sample_f(), Distribution1D::SampleContinuous(), Distribution1D::SampleDiscrete(), VisibilityTester::SetRay(), VisibilityTester::SetSegment(), SHEvaluate(), SHRotateXPlus(), SHRotateZ(), Timer::Start(), Timer::Stop(), TasksCleanup(), MIPMap< T >::Texel(), RWMutexLock::UpgradeToWrite(), and Vector::Vector().

#define INFINITY   FLT_MAX
#define INV_FOURPI   0.07957747154594766788f

Definition at line 176 of file pbrt.h.

Referenced by K().

#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define M_PI   3.14159265358979323846f
#define PBRT_L1_CACHE_LINE_SIZE   64

Definition at line 184 of file pbrt.h.

Referenced by AllocAligned(), RWMutex::Create(), and Mutex::Create().

#define PBRT_VERSION   "2.0.0"

Definition at line 169 of file pbrt.h.

Referenced by main().


Typedef Documentation

Definition at line 137 of file pbrt.h.


Function Documentation

int Ceil2Int ( float  val  )  [inline]
int Clamp ( int  val,
int  low,
int  high 
) [inline]

Definition at line 212 of file pbrt.h.

float Clamp ( float  val,
float  low,
float  high 
) [inline]
float Degrees ( float  rad  )  [inline]

Definition at line 232 of file pbrt.h.

References M_PI.

Referenced by IrradianceCacheIntegrator::IrradianceCacheIntegrator().

int Float2Int ( float  val  )  [inline]

Definition at line 273 of file pbrt.h.

Referenced by MIPMap< T >::EWA(), Distribution2D::Pdf(), and GridAccel::posToVoxel().

int Floor2Int ( float  val  )  [inline]
bool IsPowerOf2 ( int  v  )  [inline]
float Lerp ( float  t,
float  v1,
float  v2 
) [inline]
float Log2 ( float  x  )  [inline]

Definition at line 237 of file pbrt.h.

Referenced by FBm(), Log2Int(), MIPMap< T >::Lookup(), and Turbulence().

int Log2Int ( float  v  )  [inline]

Definition at line 244 of file pbrt.h.

References Floor2Int(), and Log2().

Referenced by KdTreeAccel::KdTreeAccel(), and MIPMap< T >::MIPMap().

int Mod ( int  a,
int  b 
) [inline]

Definition at line 219 of file pbrt.h.

Referenced by MIPMap< T >::MIPMap(), and MIPMap< T >::Texel().

bool Quadratic ( float  A,
float  B,
float  C,
float *  t0,
float *  t1 
) [inline]
float Radians ( float  deg  )  [inline]
int Round2Int ( float  val  )  [inline]

Definition at line 268 of file pbrt.h.

References Floor2Int().

Referenced by GridAccel::GridAccel(), KdTreeAccel::KdTreeAccel(), and ProgressReporter::Update().

uint32_t RoundUpPow2 ( uint32_t  v  )  [inline]

Variable Documentation

Generated on Sat Aug 28 20:00:12 2010 for pbrt by  doxygen 1.6.3