pbrtlex.l File Reference

#include "pbrt.h"
#include "api.h"
#include "pbrtparse.h"

Go to the source code of this file.

Classes

struct  ProgressReporter
class  StatsCounter
class  StatsRatio
class  StatsPercentage
class  ReferenceCounted
class  Reference< T >
class  ObjectArena< T >
class  MemoryArena
class  BlockedArray< T, logBlockSize >
struct  Matrix4x4
struct  IncludeInfo

Defines

#define YY_MAIN   0
#define YY_NEVER_INTERACTIVE   1

Functions

COREDLL float Noise (float x, float y=.5f, float z=.5f)
COREDLL float Noise (const Point &P)
COREDLL float FBm (const Point &P, const Vector &dpdx, const Vector &dpdy, float omega, int octaves)
COREDLL float Turbulence (const Point &P, const Vector &dpdx, const Vector &dpdy, float omega, int octaves)
COREDLL void Info (const char *,...) PRINTF_FUNC
COREDLL void Warning (const char *,...) PRINTF_FUNC
COREDLL void Error (const char *,...) PRINTF_FUNC
COREDLL void Severe (const char *,...) PRINTF_FUNC
void StatsPrint (FILE *dest)
void StatsCleanup ()
COREDLL void * AllocAligned (size_t size)
COREDLL void FreeAligned (void *)
COREDLL bool SolveLinearSystem2x2 (const float A[2][2], const float B[2], float x[2])
COREDLL unsigned long genrand_int32 (void)
COREDLL float genrand_real1 (void)
COREDLL float genrand_real2 (void)
COREDLL SpectrumReadImage (const string &name, int *xSize, int *ySize)
COREDLL void WriteRGBAImage (const string &name, float *pixels, float *alpha, int XRes, int YRes, int totalXRes, int totalYRes, int xOffset, int yOffset)
COREDLL void pbrtInit ()
COREDLL void pbrtCleanup ()
COREDLL Transform Translate (const Vector &delta)
COREDLL Transform Scale (float x, float y, float z)
COREDLL Transform RotateX (float angle)
COREDLL Transform RotateY (float angle)
COREDLL Transform RotateZ (float angle)
COREDLL Transform Rotate (float angle, const Vector &axis)
COREDLL Transform LookAt (const Point &pos, const Point &look, const Vector &up)
COREDLL Transform Orthographic (float znear, float zfar)
COREDLL Transform Perspective (float fov, float znear, float zfar)
COREDLL Spectrum FrDiel (float cosi, float cost, const Spectrum &etai, const Spectrum &etat)
COREDLL Spectrum FrCond (float cosi, const Spectrum &n, const Spectrum &k)
COREDLL Spectrum FresnelApproxEta (const Spectrum &intensity)
COREDLL Spectrum FresnelApproxK (const Spectrum &intensity)
COREDLL float Lanczos (float, float tau=2)
COREDLL Spectrum EstimateDirect (const Scene *scene, const Light *light, const Point &p, const Normal &n, const Vector &wo, BSDF *bsdf, const Sample *sample, int lightSamp, int bsdfSamp, int bsdfComponent, u_int sampleNum)
COREDLL void ComputeStep1dCDF (float *f, int nValues, float *c, float *cdf)
COREDLL float SampleStep1d (float *f, float *cdf, float c, int nSteps, float u, float *weight)
COREDLL void ConcentricSampleDisk (float u1, float u2, float *dx, float *dy)
COREDLL void UniformSampleTriangle (float ud1, float ud2, float *u, float *v)
COREDLL bool ParseFile (const char *filename)
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 Log2Int (float v)
bool IsPowerOf2 (int v)
u_int RoundUpPow2 (u_int v)
int Round2Int (double val)
int Float2Int (double val)
int Floor2Int (double val)
int Ceil2Int (double val)
float RandomFloat ()
unsigned long RandomUInt ()
bool Quadratic (float A, float B, float C, float *t0, float *t1)
float SmoothStep (float min, float max, float value)
float ExponentialAverage (float avg, float val, float alpha)
COREDLL void pbrtIdentity ()
COREDLL void pbrtTranslate (float dx, float dy, float dz)
COREDLL void pbrtRotate (float angle, float ax, float ay, float az)
COREDLL void pbrtScale (float sx, float sy, float sz)
COREDLL void pbrtLookAt (float ex, float ey, float ez, float lx, float ly, float lz, float ux, float uy, float uz)
COREDLL void pbrtConcatTransform (float transform[16])
COREDLL void pbrtTransform (float transform[16])
COREDLL void pbrtCoordinateSystem (const string &)
COREDLL void pbrtCoordSysTransform (const string &)
COREDLL void pbrtPixelFilter (const string &name, const ParamSet &params)
COREDLL void pbrtFilm (const string &type, const ParamSet &params)
COREDLL void pbrtSampler (const string &name, const ParamSet &params)
COREDLL void pbrtAccelerator (const string &name, const ParamSet &params)
COREDLL void pbrtSurfaceIntegrator (const string &name, const ParamSet &params)
COREDLL void pbrtVolumeIntegrator (const string &name, const ParamSet &params)
COREDLL void pbrtCamera (const string &, const ParamSet &cameraParams)
COREDLL void pbrtSearchPath (const string &path)
COREDLL void pbrtWorldBegin ()
COREDLL void pbrtAttributeBegin ()
COREDLL void pbrtAttributeEnd ()
COREDLL void pbrtTransformBegin ()
COREDLL void pbrtTransformEnd ()
COREDLL void pbrtTexture (const string &name, const string &type, const string &texname, const ParamSet &params)
COREDLL void pbrtMaterial (const string &name, const ParamSet &params)
COREDLL void pbrtLightSource (const string &name, const ParamSet &params)
COREDLL void pbrtAreaLightSource (const string &name, const ParamSet &params)
COREDLL void pbrtShape (const string &name, const ParamSet &params)
COREDLL void pbrtReverseOrientation ()
COREDLL void pbrtVolume (const string &name, const ParamSet &params)
COREDLL void pbrtObjectBegin (const string &name)
COREDLL void pbrtObjectEnd ()
COREDLL void pbrtObjectInstance (const string &name)
COREDLL void pbrtWorldEnd ()
void add_string_char (char c)
void yyerror (const char *str)
void ParseError (const char *format,...) PRINTF_FUNC
void include_push (char *filename)
void include_pop (void)
option nounput WHITESPACE[\t\0xa] NUMBER ([0-9]+|(([0-9]+\.[0-9]*)|(\.[0-9]+)))([eE][-+]?[0-9]+)?IDENT[a-zA-Z_][a-zA-Z_0-9]*%x STR COMMENT INCL INCL_FILE%%Include

Variables

vector< IncludeInfoincludeStack
int line_num
int str_pos


Define Documentation

#define YY_MAIN   0

Definition at line 27 of file pbrtlex.l.

#define YY_NEVER_INTERACTIVE   1

Definition at line 28 of file pbrtlex.l.


Function Documentation

void add_string_char ( char  c  ) 

Definition at line 55 of file pbrtlex.l.

COREDLL void * AllocAligned ( size_t  size  ) 

int Ceil2Int ( double  val  )  [inline]

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

Definition at line 554 of file pbrt.h.

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

COREDLL void ComputeStep1dCDF ( float *  f,
int  nValues,
float *  c,
float *  cdf 
)

COREDLL void ConcentricSampleDisk ( float  u1,
float  u2,
float *  dx,
float *  dy 
)

float Degrees ( float  rad  )  [inline]

Definition at line 569 of file pbrt.h.

References M_PI.

COREDLL void Error ( const char *  ,
  ... 
)

COREDLL Spectrum EstimateDirect ( const Scene scene,
const Light light,
const Point p,
const Normal n,
const Vector wo,
BSDF bsdf,
const Sample sample,
int  lightSamp,
int  bsdfSamp,
int  bsdfComponent,
u_int  sampleNum 
)

float ExponentialAverage ( float  avg,
float  val,
float  alpha 
) [inline]

Definition at line 661 of file pbrt.h.

Referenced by WeightedSampleOneLight().

COREDLL float FBm ( const Point P,
const Vector dpdx,
const Vector dpdy,
float  omega,
int  octaves 
)

int Float2Int ( double  val  )  [inline]

int Floor2Int ( double  val  )  [inline]

COREDLL Spectrum FrCond ( float  cosi,
const Spectrum n,
const Spectrum k 
)

Definition at line 40 of file reflection.cpp.

Referenced by FresnelConductor::Evaluate().

COREDLL Spectrum FrDiel ( float  cosi,
float  cost,
const Spectrum etai,
const Spectrum etat 
)

Definition at line 31 of file reflection.cpp.

Referenced by FresnelDielectric::Evaluate().

COREDLL void FreeAligned ( void *   ) 

COREDLL Spectrum FresnelApproxEta ( const Spectrum intensity  ) 

Definition at line 52 of file reflection.cpp.

References Spectrum::Clamp(), and Spectrum::Sqrt().

Referenced by ShinyMetal::GetBSDF().

COREDLL Spectrum FresnelApproxK ( const Spectrum intensity  ) 

Definition at line 57 of file reflection.cpp.

References Spectrum::Clamp(), and Spectrum::Sqrt().

COREDLL unsigned long genrand_int32 ( void   ) 

Definition at line 340 of file util.cpp.

References init_genrand(), LOWER_MASK, M, MATRIX_A, mt, mti, N, and UPPER_MASK.

Referenced by genrand_real1(), genrand_real2(), and RandomUInt().

COREDLL float genrand_real1 ( void   ) 

Definition at line 377 of file util.cpp.

References genrand_int32().

COREDLL float genrand_real2 ( void   ) 

Definition at line 383 of file util.cpp.

References genrand_int32().

Referenced by RandomFloat().

void include_pop ( void   ) 

Definition at line 83 of file pbrtlex.l.

References current_file.

void include_push ( char *  filename  ) 

COREDLL void Info ( const char *  ,
  ... 
)

Definition at line 74 of file util.cpp.

References PBRT_ERROR_CONTINUE, and processError().

bool IsPowerOf2 ( int  v  )  [inline]

Definition at line 584 of file pbrt.h.

Referenced by Voxel::AddPrimitive(), LDSampler::LDSampler(), and MIPMap< T >::MIPMap().

COREDLL float Lanczos ( float  ,
float  tau = 2 
)

Definition at line 241 of file texture.cpp.

References M_PI.

Referenced by MIPMap< Spectrum >::resampleWeights().

float Lerp ( float  t,
float  v1,
float  v2 
) [inline]

float Log2 ( float  x  )  [inline]

Definition at line 572 of file pbrt.h.

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

int Log2Int ( float  v  )  [inline]

Definition at line 576 of file pbrt.h.

References _doublemagicroundeps, and Log2().

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

COREDLL Transform LookAt ( const Point pos,
const Point look,
const Vector up 
)

Definition at line 113 of file transform.cpp.

References Cross(), Matrix4x4::Inverse(), Normalize(), Vector::x, Point::x, Vector::y, Point::y, Vector::z, and Point::z.

Referenced by pbrtLookAt().

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

Definition at line 559 of file pbrt.h.

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

COREDLL float Noise ( const Point P  ) 

Definition at line 186 of file texture.cpp.

References Noise(), Point::x, Point::y, and Point::z.

COREDLL float Noise ( float  x,
float  y = .5f,
float  z = .5f 
)

Definition at line 156 of file texture.cpp.

References Floor2Int(), Grad(), Lerp(), NOISE_PERM_SIZE, and NoiseWeight().

Referenced by DotsTexture< T >::Evaluate(), FBm(), Noise(), and Turbulence().

option nounput WHITESPACE [ \t\0xa] NUMBER ( [0-9] +|  ([0-9]+\.[0-9]*)|(\.[0-9]+)  ) 

Definition at line 96 of file pbrtlex.l.

COREDLL Transform Orthographic ( float  znear,
float  zfar 
)

Definition at line 177 of file transform.cpp.

References Scale(), and Translate().

void ParseError ( const char *  format,
  ... 
)

COREDLL bool ParseFile ( const char *  filename  ) 

Definition at line 27 of file parser.cpp.

References current_file, and line_num.

Referenced by main().

COREDLL void pbrtAccelerator ( const string &  name,
const ParamSet params 
)

COREDLL void pbrtAreaLightSource ( const string &  name,
const ParamSet params 
)

Definition at line 348 of file api.cpp.

References GraphicsState::areaLight, GraphicsState::areaLightParams, and VERIFY_WORLD.

COREDLL void pbrtAttributeBegin (  ) 

Definition at line 274 of file api.cpp.

References pushedGraphicsStates, pushedTransforms, and VERIFY_WORLD.

Referenced by pbrtObjectBegin().

COREDLL void pbrtAttributeEnd (  ) 

Definition at line 279 of file api.cpp.

References Error(), pushedGraphicsStates, pushedTransforms, and VERIFY_WORLD.

Referenced by pbrtObjectEnd().

COREDLL void pbrtCamera ( const string &  ,
const ParamSet cameraParams 
)

COREDLL void pbrtCleanup (  ) 

Definition at line 163 of file api.cpp.

References currentApiState, Error(), STATE_UNINITIALIZED, STATE_WORLD_BLOCK, and StatsCleanup().

Referenced by main().

COREDLL void pbrtConcatTransform ( float  transform[16]  ) 

Definition at line 191 of file api.cpp.

References VERIFY_INITIALIZED.

COREDLL void pbrtCoordinateSystem ( const string &   ) 

Definition at line 213 of file api.cpp.

References namedCoordinateSystems, and VERIFY_INITIALIZED.

COREDLL void pbrtCoordSysTransform ( const string &   ) 

Definition at line 217 of file api.cpp.

References namedCoordinateSystems, and VERIFY_INITIALIZED.

COREDLL void pbrtFilm ( const string &  type,
const ParamSet params 
)

Definition at line 229 of file api.cpp.

References RenderOptions::FilmName, RenderOptions::FilmParams, and VERIFY_OPTIONS.

COREDLL void pbrtIdentity (  ) 

Definition at line 174 of file api.cpp.

References VERIFY_INITIALIZED.

COREDLL void pbrtInit (  ) 

Definition at line 141 of file api.cpp.

References currentApiState, Error(), GraphicsState::GraphicsState(), STATE_OPTIONS_BLOCK, and STATE_UNINITIALIZED.

Referenced by main().

COREDLL void pbrtLightSource ( const string &  name,
const ParamSet params 
)

Definition at line 338 of file api.cpp.

References Error(), RenderOptions::lights, MakeLight(), and VERIFY_WORLD.

COREDLL void pbrtLookAt ( float  ex,
float  ey,
float  ez,
float  lx,
float  ly,
float  lz,
float  ux,
float  uy,
float  uz 
)

Definition at line 207 of file api.cpp.

References LookAt(), and VERIFY_INITIALIZED.

COREDLL void pbrtMaterial ( const string &  name,
const ParamSet params 
)

Definition at line 333 of file api.cpp.

References GraphicsState::material, GraphicsState::materialParams, and VERIFY_WORLD.

COREDLL void pbrtObjectBegin ( const string &  name  ) 

COREDLL void pbrtObjectEnd (  ) 

Definition at line 420 of file api.cpp.

References RenderOptions::currentInstance, Error(), pbrtAttributeEnd(), and VERIFY_WORLD.

COREDLL void pbrtObjectInstance ( const string &  name  ) 

COREDLL void pbrtPixelFilter ( const string &  name,
const ParamSet params 
)

Definition at line 223 of file api.cpp.

References RenderOptions::FilterName, RenderOptions::FilterParams, and VERIFY_OPTIONS.

COREDLL void pbrtReverseOrientation (  ) 

Definition at line 397 of file api.cpp.

References GraphicsState::reverseOrientation, and VERIFY_WORLD.

COREDLL void pbrtRotate ( float  angle,
float  ax,
float  ay,
float  az 
)

Definition at line 199 of file api.cpp.

References Rotate(), and VERIFY_INITIALIZED.

COREDLL void pbrtSampler ( const string &  name,
const ParamSet params 
)

Definition at line 234 of file api.cpp.

References RenderOptions::SamplerName, RenderOptions::SamplerParams, and VERIFY_OPTIONS.

COREDLL void pbrtScale ( float  sx,
float  sy,
float  sz 
)

Definition at line 203 of file api.cpp.

References Scale(), and VERIFY_INITIALIZED.

COREDLL void pbrtSearchPath ( const string &  path  ) 

Definition at line 263 of file api.cpp.

References RenderOptions::gotSearchPath, UpdatePluginPath(), and VERIFY_OPTIONS.

COREDLL void pbrtShape ( const string &  name,
const ParamSet params 
)

COREDLL void pbrtSurfaceIntegrator ( const string &  name,
const ParamSet params 
)

COREDLL void pbrtTexture ( const string &  name,
const string &  type,
const string &  texname,
const ParamSet params 
)

COREDLL void pbrtTransform ( float  transform[16]  ) 

Definition at line 183 of file api.cpp.

References VERIFY_INITIALIZED.

COREDLL void pbrtTransformBegin (  ) 

Definition at line 291 of file api.cpp.

References pushedTransforms, and VERIFY_WORLD.

COREDLL void pbrtTransformEnd (  ) 

Definition at line 295 of file api.cpp.

References Error(), pushedTransforms, and VERIFY_WORLD.

COREDLL void pbrtTranslate ( float  dx,
float  dy,
float  dz 
)

Definition at line 178 of file api.cpp.

References Translate(), and VERIFY_INITIALIZED.

COREDLL void pbrtVolume ( const string &  name,
const ParamSet params 
)

Definition at line 402 of file api.cpp.

References MakeVolumeRegion(), VERIFY_WORLD, and RenderOptions::volumeRegions.

COREDLL void pbrtVolumeIntegrator ( const string &  name,
const ParamSet params 
)

COREDLL void pbrtWorldBegin (  ) 

Definition at line 268 of file api.cpp.

References currentApiState, namedCoordinateSystems, STATE_WORLD_BLOCK, and VERIFY_OPTIONS.

COREDLL void pbrtWorldEnd (  ) 

COREDLL Transform Perspective ( float  fov,
float  znear,
float  zfar 
)

Definition at line 182 of file transform.cpp.

References Radians(), Scale(), and Transform::Transform().

Referenced by ProjectionLight::ProjectionLight().

bool Quadratic ( float  A,
float  B,
float  C,
float *  t0,
float *  t1 
) [inline]

float Radians ( float  deg  )  [inline]

float RandomFloat (  )  [inline]

unsigned long RandomUInt (  )  [inline]

COREDLL Spectrum* ReadImage ( const string &  name,
int *  xSize,
int *  ySize 
)

COREDLL Transform Rotate ( float  angle,
const Vector axis 
)

Definition at line 84 of file transform.cpp.

References Normalize(), Radians(), Matrix4x4::Transpose(), Vector::x, Vector::y, and Vector::z.

Referenced by pbrtRotate().

COREDLL Transform RotateX ( float  angle  ) 

Definition at line 56 of file transform.cpp.

References Radians(), and Matrix4x4::Transpose().

COREDLL Transform RotateY ( float  angle  ) 

Definition at line 65 of file transform.cpp.

References Radians(), and Matrix4x4::Transpose().

COREDLL Transform RotateZ ( float  angle  ) 

Definition at line 75 of file transform.cpp.

References Radians(), and Matrix4x4::Transpose().

int Round2Int ( double  val  )  [inline]

u_int RoundUpPow2 ( u_int  v  )  [inline]

COREDLL float SampleStep1d ( float *  f,
float *  cdf,
float  c,
int  nSteps,
float  u,
float *  weight 
)

COREDLL Transform Scale ( float  x,
float  y,
float  z 
)

COREDLL void Severe ( const char *  ,
  ... 
)

float SmoothStep ( float  min,
float  max,
float  value 
) [inline]

Definition at line 657 of file pbrt.h.

References Clamp().

Referenced by FBm(), IGIIntegrator::Li(), and Turbulence().

COREDLL bool SolveLinearSystem2x2 ( const float  A[2][2],
const float  B[2],
float  x[2] 
)

void StatsCleanup (  ) 

Definition at line 277 of file util.cpp.

References trackers.

Referenced by pbrtCleanup().

void StatsPrint ( FILE *  dest  ) 

COREDLL Transform Translate ( const Vector delta  ) 

COREDLL float Turbulence ( const Point P,
const Vector dpdx,
const Vector dpdy,
float  omega,
int  octaves 
)

Definition at line 221 of file texture.cpp.

References Floor2Int(), Vector::LengthSquared(), Log2(), Noise(), and SmoothStep().

Referenced by WrinkledTexture< T >::Evaluate().

COREDLL void UniformSampleTriangle ( float  ud1,
float  ud2,
float *  u,
float *  v 
)

Definition at line 135 of file mc.cpp.

Referenced by Triangle::Sample().

COREDLL void Warning ( const char *  ,
  ... 
)

COREDLL void WriteRGBAImage ( const string &  name,
float *  pixels,
float *  alpha,
int  XRes,
int  YRes,
int  totalXRes,
int  totalYRes,
int  xOffset,
int  yOffset 
)

Definition at line 74 of file exrio.cpp.

References Error().

Referenced by ImageFilm::WriteImage().

void yyerror ( const char *  str  ) 


Variable Documentation

Definition at line 50 of file pbrtlex.l.

int line_num

Definition at line 32 of file core/samplepat.cpp.

Referenced by ParseFile(), and processError().

int str_pos

Definition at line 53 of file pbrtlex.l.


Generated on Mon Jul 20 17:31:54 2009 for pbrt by  doxygen 1.5.6