#include "stdafx.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include <malloc.h>
#include <alloca.h>
#include <assert.h>
#include <algorithm>
#include "pbrt.h"
#include <pthread.h>
#include <semaphore.h>
#include "parallel.h"
#include "geometry.h"
#include "spectrum.h"
#include <map>
#include "transform.h"
#include "memory.h"
#include "primitive.h"
#include "probes.h"
#include "shape.h"
#include "rng.h"
#include "material.h"
#include "renderer.h"
#include "integrator.h"
#include "accelerators/bvh.h"
#include "accelerators/grid.h"
#include "accelerators/kdtreeaccel.h"
#include "cameras/environment.h"
#include "cameras/orthographic.h"
#include "cameras/perspective.h"
#include "film.h"
#include "sampler.h"
#include "paramset.h"
#include "filter.h"
#include "kdtree.h"
#include "scene.h"
#include "volume.h"
#include "light.h"
#include "texture.h"
#include "mipmap.h"
#include "reflection.h"
#include "renderers/surfacepoints.h"
Go to the source code of this file.
Classes | |
struct | TransformSet |
struct | RenderOptions |
struct | GraphicsState |
class | TransformCache |
Defines | |
#define | MAX_TRANSFORMS 2 |
#define | START_TRANSFORM_BITS (1 << 0) |
#define | END_TRANSFORM_BITS (1 << 1) |
#define | ALL_TRANSFORMS_BITS ((1 << MAX_TRANSFORMS) - 1) |
#define | STATE_UNINITIALIZED 0 |
#define | STATE_OPTIONS_BLOCK 1 |
#define | STATE_WORLD_BLOCK 2 |
#define | VERIFY_INITIALIZED(func) |
#define | VERIFY_OPTIONS(func) |
#define | VERIFY_WORLD(func) |
#define | FOR_ACTIVE_TRANSFORMS(expr) |
#define | WARN_IF_ANIMATED_TRANSFORM(func) |
Functions | |
Reference< Shape > | MakeShape (const string &name, const Transform *object2world, const Transform *world2object, bool reverseOrientation, const ParamSet ¶mSet) |
Reference< Material > | MakeMaterial (const string &name, const Transform &mtl2world, const TextureParams &mp) |
Reference< Texture< float > > | MakeFloatTexture (const string &name, const Transform &tex2world, const TextureParams &tp) |
Reference< Texture< Spectrum > > | MakeSpectrumTexture (const string &name, const Transform &tex2world, const TextureParams &tp) |
Light * | MakeLight (const string &name, const Transform &light2world, const ParamSet ¶mSet) |
AreaLight * | MakeAreaLight (const string &name, const Transform &light2world, const ParamSet ¶mSet, const Reference< Shape > &shape) |
VolumeRegion * | MakeVolumeRegion (const string &name, const Transform &volume2world, const ParamSet ¶mSet) |
SurfaceIntegrator * | MakeSurfaceIntegrator (const string &name, const ParamSet ¶mSet) |
VolumeIntegrator * | MakeVolumeIntegrator (const string &name, const ParamSet ¶mSet) |
Primitive * | MakeAccelerator (const string &name, const vector< Reference< Primitive > > &prims, const ParamSet ¶mSet) |
Camera * | MakeCamera (const string &name, const ParamSet ¶mSet, const TransformSet &cam2worldSet, float transformStart, float transformEnd, Film *film) |
Sampler * | MakeSampler (const string &name, const ParamSet ¶mSet, const Film *film, const Camera *camera) |
Filter * | MakeFilter (const string &name, const ParamSet ¶mSet) |
Film * | MakeFilm (const string &name, const ParamSet ¶mSet, Filter *filter) |
void | pbrtInit (const Options &opt) |
void | pbrtCleanup () |
void | pbrtIdentity () |
void | pbrtTranslate (float dx, float dy, float dz) |
void | pbrtTransform (float tr[16]) |
void | pbrtConcatTransform (float tr[16]) |
void | pbrtRotate (float angle, float dx, float dy, float dz) |
void | pbrtScale (float sx, float sy, float sz) |
void | pbrtLookAt (float ex, float ey, float ez, float lx, float ly, float lz, float ux, float uy, float uz) |
void | pbrtCoordinateSystem (const string &name) |
void | pbrtCoordSysTransform (const string &name) |
void | pbrtActiveTransformAll () |
void | pbrtActiveTransformEndTime () |
void | pbrtActiveTransformStartTime () |
void | pbrtTransformTimes (float start, float end) |
void | pbrtPixelFilter (const string &name, const ParamSet ¶ms) |
void | pbrtFilm (const string &type, const ParamSet ¶ms) |
void | pbrtSampler (const string &name, const ParamSet ¶ms) |
void | pbrtAccelerator (const string &name, const ParamSet ¶ms) |
void | pbrtSurfaceIntegrator (const string &name, const ParamSet ¶ms) |
void | pbrtVolumeIntegrator (const string &name, const ParamSet ¶ms) |
void | pbrtRenderer (const string &name, const ParamSet ¶ms) |
void | pbrtCamera (const string &name, const ParamSet ¶ms) |
void | pbrtWorldBegin () |
void | pbrtAttributeBegin () |
void | pbrtAttributeEnd () |
void | pbrtTransformBegin () |
void | pbrtTransformEnd () |
void | pbrtTexture (const string &name, const string &type, const string &texname, const ParamSet ¶ms) |
void | pbrtMaterial (const string &name, const ParamSet ¶ms) |
void | pbrtMakeNamedMaterial (const string &name, const ParamSet ¶ms) |
void | pbrtNamedMaterial (const string &name) |
void | pbrtLightSource (const string &name, const ParamSet ¶ms) |
void | pbrtAreaLightSource (const string &name, const ParamSet ¶ms) |
void | pbrtShape (const string &name, const ParamSet ¶ms) |
void | pbrtReverseOrientation () |
void | pbrtVolume (const string &name, const ParamSet ¶ms) |
void | pbrtObjectBegin (const string &name) |
void | pbrtObjectEnd () |
void | pbrtObjectInstance (const string &name) |
void | pbrtWorldEnd () |
Variables | |
Options | PbrtOptions |
static int | currentApiState = STATE_UNINITIALIZED |
static TransformSet | curTransform |
static int | activeTransformBits = ALL_TRANSFORMS_BITS |
static map< string, TransformSet > | namedCoordinateSystems |
static RenderOptions * | renderOptions = NULL |
static GraphicsState | graphicsState |
static vector< GraphicsState > | pushedGraphicsStates |
static vector< TransformSet > | pushedTransforms |
static vector< uint32_t > | pushedActiveTransformBits |
static TransformCache | transformCache |
#define ALL_TRANSFORMS_BITS ((1 << MAX_TRANSFORMS) - 1) |
Definition at line 132 of file api.cpp.
Referenced by pbrtActiveTransformAll(), pbrtWorldBegin(), and pbrtWorldEnd().
#define END_TRANSFORM_BITS (1 << 1) |
Definition at line 131 of file api.cpp.
Referenced by pbrtActiveTransformEndTime().
#define FOR_ACTIVE_TRANSFORMS | ( | expr | ) |
for (int i = 0; i < MAX_TRANSFORMS; ++i) \ if (activeTransformBits & (1 << i)) { expr }
Definition at line 298 of file api.cpp.
Referenced by pbrtConcatTransform(), pbrtIdentity(), pbrtLookAt(), pbrtRotate(), pbrtScale(), pbrtTransform(), and pbrtTranslate().
#define MAX_TRANSFORMS 2 |
Definition at line 129 of file api.cpp.
Referenced by TransformSet::IsAnimated(), MakeCamera(), TransformSet::operator[](), pbrtObjectInstance(), pbrtShape(), pbrtWorldBegin(), and pbrtWorldEnd().
#define START_TRANSFORM_BITS (1 << 0) |
Definition at line 130 of file api.cpp.
Referenced by pbrtActiveTransformStartTime().
#define STATE_OPTIONS_BLOCK 1 |
Definition at line 264 of file api.cpp.
Referenced by pbrtInit(), and pbrtWorldEnd().
#define STATE_UNINITIALIZED 0 |
Definition at line 263 of file api.cpp.
Referenced by pbrtCleanup(), and pbrtInit().
#define STATE_WORLD_BLOCK 2 |
Definition at line 265 of file api.cpp.
Referenced by pbrtCleanup(), and pbrtWorldBegin().
#define VERIFY_INITIALIZED | ( | func | ) |
if (currentApiState == STATE_UNINITIALIZED) { \ Error("pbrtInit() must be before calling \"%s()\". " \ "Ignoring.", func); \ return; \ } else
Definition at line 278 of file api.cpp.
Referenced by pbrtConcatTransform(), pbrtCoordinateSystem(), pbrtCoordSysTransform(), pbrtIdentity(), pbrtLookAt(), pbrtRotate(), pbrtScale(), pbrtTransform(), and pbrtTranslate().
#define VERIFY_OPTIONS | ( | func | ) |
VERIFY_INITIALIZED(func); \ if (currentApiState == STATE_WORLD_BLOCK) { \ Error("Options cannot be set inside world block; " \ "\"%s\" not allowed. Ignoring.", func); \ return; \ } else
Definition at line 284 of file api.cpp.
Referenced by pbrtAccelerator(), pbrtCamera(), pbrtFilm(), pbrtPixelFilter(), pbrtRenderer(), pbrtSampler(), pbrtSurfaceIntegrator(), pbrtTransformTimes(), pbrtVolumeIntegrator(), and pbrtWorldBegin().
#define VERIFY_WORLD | ( | func | ) |
VERIFY_INITIALIZED(func); \ if (currentApiState == STATE_OPTIONS_BLOCK) { \ Error("Scene description must be inside world block; " \ "\"%s\" not allowed. Ignoring.", func); \ return; \ } else
Definition at line 291 of file api.cpp.
Referenced by pbrtAreaLightSource(), pbrtAttributeBegin(), pbrtAttributeEnd(), pbrtLightSource(), pbrtMakeNamedMaterial(), pbrtMaterial(), pbrtNamedMaterial(), pbrtObjectBegin(), pbrtObjectEnd(), pbrtObjectInstance(), pbrtReverseOrientation(), pbrtShape(), pbrtTexture(), pbrtTransformBegin(), pbrtTransformEnd(), pbrtVolume(), and pbrtWorldEnd().
#define WARN_IF_ANIMATED_TRANSFORM | ( | func | ) |
do { if (curTransform.IsAnimated()) \ Warning("Animated transformations set; ignoring for \"%s\"" \ "and using the start transform only", func); \ } while (false)
Definition at line 301 of file api.cpp.
Referenced by pbrtLightSource(), pbrtMakeNamedMaterial(), pbrtTexture(), and pbrtVolume().
Primitive* MakeAccelerator | ( | const string & | name, | |
const vector< Reference< Primitive > > & | prims, | |||
const ParamSet & | paramSet | |||
) |
Definition at line 571 of file api.cpp.
References CreateBVHAccelerator(), CreateGridAccelerator(), CreateKdTreeAccelerator(), ParamSet::ReportUnused(), and Warning().
Referenced by RenderOptions::MakeScene(), and pbrtObjectInstance().
AreaLight* MakeAreaLight | ( | const string & | name, | |
const Transform & | light2world, | |||
const ParamSet & | paramSet, | |||
const Reference< Shape > & | shape | |||
) |
Definition at line 493 of file api.cpp.
References CreateDiffuseAreaLight(), ParamSet::ReportUnused(), and Warning().
Referenced by pbrtShape().
Camera* MakeCamera | ( | const string & | name, | |
const ParamSet & | paramSet, | |||
const TransformSet & | cam2worldSet, | |||
float | transformStart, | |||
float | transformEnd, | |||
Film * | film | |||
) |
Definition at line 588 of file api.cpp.
References Assert, CreateEnvironmentCamera(), CreateOrthographicCamera(), CreatePerspectiveCamera(), TransformCache::Lookup(), MAX_TRANSFORMS, ParamSet::ReportUnused(), and Warning().
Definition at line 654 of file api.cpp.
References CreateImageFilm(), ParamSet::ReportUnused(), and Warning().
Referenced by RenderOptions::MakeCamera().
Definition at line 634 of file api.cpp.
References CreateBoxFilter(), CreateGaussianFilter(), CreateMitchellFilter(), CreateSincFilter(), CreateTriangleFilter(), ParamSet::ReportUnused(), and Warning().
Referenced by RenderOptions::MakeCamera().
Reference<Texture<float> > MakeFloatTexture | ( | const string & | name, | |
const Transform & | tex2world, | |||
const TextureParams & | tp | |||
) |
Definition at line 403 of file api.cpp.
References CreateBilerpFloatTexture(), CreateCheckerboardFloatTexture(), CreateConstantFloatTexture(), CreateDotsFloatTexture(), CreateFBmFloatTexture(), CreateImageFloatTexture(), CreateMarbleFloatTexture(), CreateMixFloatTexture(), CreateScaleFloatTexture(), CreateUVFloatTexture(), CreateWindyFloatTexture(), CreateWrinkledFloatTexture(), TextureParams::ReportUnused(), and Warning().
Referenced by pbrtTexture().
Definition at line 471 of file api.cpp.
References CreateDistantLight(), CreateGoniometricLight(), CreateInfiniteLight(), CreatePointLight(), CreateProjectionLight(), CreateSpotLight(), ParamSet::ReportUnused(), and Warning().
Referenced by pbrtLightSource().
Reference<Material> MakeMaterial | ( | const string & | name, | |
const Transform & | mtl2world, | |||
const TextureParams & | mp | |||
) |
Definition at line 351 of file api.cpp.
References CreateGlassMaterial(), CreateKdSubsurfaceMaterial(), CreateMatteMaterial(), CreateMeasuredMaterial(), CreateMetalMaterial(), CreateMirrorMaterial(), CreateMixMaterial(), CreatePlasticMaterial(), CreateSubstrateMaterial(), CreateSubsurfaceMaterial(), CreateTranslucentMaterial(), CreateUberMaterial(), Error(), TextureParams::FindString(), GraphicsState::namedMaterials, TextureParams::ReportUnused(), and Warning().
Referenced by GraphicsState::CreateMaterial(), and pbrtMakeNamedMaterial().
Sampler* MakeSampler | ( | const string & | name, | |
const ParamSet & | paramSet, | |||
const Film * | film, | |||
const Camera * | camera | |||
) |
Definition at line 612 of file api.cpp.
References CreateAdaptiveSampler(), CreateBestCandidateSampler(), CreateHaltonSampler(), CreateLowDiscrepancySampler(), CreateRandomSampler(), CreateStratifiedSampler(), ParamSet::ReportUnused(), and Warning().
Referenced by RenderOptions::MakeRenderer().
Reference<Shape> MakeShape | ( | const string & | name, | |
const Transform * | object2world, | |||
const Transform * | world2object, | |||
bool | reverseOrientation, | |||
const ParamSet & | paramSet | |||
) |
Definition at line 308 of file api.cpp.
References CreateConeShape(), CreateCylinderShape(), CreateDiskShape(), CreateHeightfieldShape(), CreateHyperboloidShape(), CreateLoopSubdivShape(), CreateNURBSShape(), CreateParaboloidShape(), CreateSphereShape(), CreateTriangleMeshShape(), GraphicsState::floatTextures, ParamSet::ReportUnused(), and Warning().
Referenced by pbrtShape().
Reference<Texture<Spectrum> > MakeSpectrumTexture | ( | const string & | name, | |
const Transform & | tex2world, | |||
const TextureParams & | tp | |||
) |
Definition at line 437 of file api.cpp.
References CreateBilerpSpectrumTexture(), CreateCheckerboardSpectrumTexture(), CreateConstantSpectrumTexture(), CreateDotsSpectrumTexture(), CreateFBmSpectrumTexture(), CreateImageSpectrumTexture(), CreateMarbleSpectrumTexture(), CreateMixSpectrumTexture(), CreateScaleSpectrumTexture(), CreateUVSpectrumTexture(), CreateWindySpectrumTexture(), CreateWrinkledSpectrumTexture(), TextureParams::ReportUnused(), and Warning().
Referenced by pbrtTexture().
SurfaceIntegrator* MakeSurfaceIntegrator | ( | const string & | name, | |
const ParamSet & | paramSet | |||
) |
Definition at line 522 of file api.cpp.
References CreateAmbientOcclusionIntegrator(), CreateDiffusePRTIntegratorSurfaceIntegrator(), CreateDipoleSubsurfaceIntegrator(), CreateDirectLightingIntegrator(), CreateGlossyPRTIntegratorSurfaceIntegrator(), CreateIGISurfaceIntegrator(), CreateIrradianceCacheIntegrator(), CreatePathSurfaceIntegrator(), CreatePhotonMapSurfaceIntegrator(), CreateRadianceProbesSurfaceIntegrator(), CreateWhittedSurfaceIntegrator(), ParamSet::ReportUnused(), and Warning().
Referenced by RenderOptions::MakeRenderer().
VolumeIntegrator* MakeVolumeIntegrator | ( | const string & | name, | |
const ParamSet & | paramSet | |||
) |
Definition at line 555 of file api.cpp.
References CreateEmissionVolumeIntegrator(), CreateSingleScatteringIntegrator(), ParamSet::ReportUnused(), and Warning().
Referenced by RenderOptions::MakeRenderer().
VolumeRegion* MakeVolumeRegion | ( | const string & | name, | |
const Transform & | volume2world, | |||
const ParamSet & | paramSet | |||
) |
Definition at line 506 of file api.cpp.
References CreateExponentialVolumeRegion(), CreateGridVolumeRegion(), CreateHomogeneousVolumeDensityRegion(), ParamSet::ReportUnused(), and Warning().
Referenced by pbrtVolume().
void pbrtAccelerator | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 809 of file api.cpp.
References RenderOptions::AcceleratorName, RenderOptions::AcceleratorParams, and VERIFY_OPTIONS.
void pbrtActiveTransformAll | ( | ) |
Definition at line 766 of file api.cpp.
References activeTransformBits, and ALL_TRANSFORMS_BITS.
void pbrtActiveTransformEndTime | ( | ) |
Definition at line 771 of file api.cpp.
References activeTransformBits, and END_TRANSFORM_BITS.
void pbrtActiveTransformStartTime | ( | ) |
Definition at line 776 of file api.cpp.
References activeTransformBits, and START_TRANSFORM_BITS.
void pbrtAreaLightSource | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 973 of file api.cpp.
References GraphicsState::areaLight, GraphicsState::areaLightParams, and VERIFY_WORLD.
void pbrtAttributeBegin | ( | ) |
Definition at line 856 of file api.cpp.
References activeTransformBits, pushedActiveTransformBits, pushedGraphicsStates, pushedTransforms, and VERIFY_WORLD.
Referenced by pbrtObjectBegin().
void pbrtAttributeEnd | ( | ) |
Definition at line 864 of file api.cpp.
References activeTransformBits, Error(), pushedActiveTransformBits, pushedGraphicsStates, pushedTransforms, and VERIFY_WORLD.
Referenced by pbrtObjectEnd().
void pbrtCamera | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 837 of file api.cpp.
References RenderOptions::CameraName, RenderOptions::CameraParams, RenderOptions::CameraToWorld, Inverse(), namedCoordinateSystems, and VERIFY_OPTIONS.
void pbrtCleanup | ( | ) |
Definition at line 680 of file api.cpp.
References currentApiState, Error(), STATE_UNINITIALIZED, and STATE_WORLD_BLOCK.
Referenced by main().
void pbrtConcatTransform | ( | float | tr[16] | ) |
Definition at line 716 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, and VERIFY_INITIALIZED.
void pbrtCoordinateSystem | ( | const string & | name | ) |
Definition at line 749 of file api.cpp.
References namedCoordinateSystems, and VERIFY_INITIALIZED.
void pbrtCoordSysTransform | ( | const string & | name | ) |
Definition at line 755 of file api.cpp.
References namedCoordinateSystems, VERIFY_INITIALIZED, and Warning().
void pbrtFilm | ( | const string & | type, | |
const ParamSet & | params | |||
) |
Definition at line 795 of file api.cpp.
References RenderOptions::FilmName, RenderOptions::FilmParams, and VERIFY_OPTIONS.
void pbrtIdentity | ( | ) |
Definition at line 693 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, and VERIFY_INITIALIZED.
void pbrtInit | ( | const Options & | opt | ) |
Definition at line 668 of file api.cpp.
References currentApiState, Error(), SampledSpectrum::Init(), STATE_OPTIONS_BLOCK, and STATE_UNINITIALIZED.
Referenced by main().
void pbrtLightSource | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 962 of file api.cpp.
References Error(), RenderOptions::lights, MakeLight(), VERIFY_WORLD, and WARN_IF_ANIMATED_TRANSFORM.
void pbrtLookAt | ( | float | ex, | |
float | ey, | |||
float | ez, | |||
float | lx, | |||
float | ly, | |||
float | lz, | |||
float | ux, | |||
float | uy, | |||
float | uz | |||
) |
Definition at line 738 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, LookAt(), VERIFY_INITIALIZED, and Warning().
void pbrtMakeNamedMaterial | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 938 of file api.cpp.
References Error(), TextureParams::FindString(), GraphicsState::floatTextures, MakeMaterial(), GraphicsState::materialParams, GraphicsState::namedMaterials, GraphicsState::spectrumTextures, VERIFY_WORLD, and WARN_IF_ANIMATED_TRANSFORM.
void pbrtMaterial | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 930 of file api.cpp.
References GraphicsState::currentNamedMaterial, GraphicsState::material, GraphicsState::materialParams, and VERIFY_WORLD.
void pbrtNamedMaterial | ( | const string & | name | ) |
Definition at line 956 of file api.cpp.
References GraphicsState::currentNamedMaterial, and VERIFY_WORLD.
void pbrtObjectBegin | ( | const string & | name | ) |
Definition at line 1086 of file api.cpp.
References RenderOptions::currentInstance, Error(), RenderOptions::instances, pbrtAttributeBegin(), and VERIFY_WORLD.
void pbrtObjectEnd | ( | ) |
Definition at line 1096 of file api.cpp.
References RenderOptions::currentInstance, Error(), pbrtAttributeEnd(), and VERIFY_WORLD.
void pbrtObjectInstance | ( | const string & | name | ) |
Definition at line 1105 of file api.cpp.
References RenderOptions::AcceleratorName, RenderOptions::AcceleratorParams, Assert, RenderOptions::currentInstance, Error(), RenderOptions::instances, TransformCache::Lookup(), MakeAccelerator(), MAX_TRANSFORMS, RenderOptions::primitives, Severe(), RenderOptions::transformEndTime, RenderOptions::transformStartTime, and VERIFY_WORLD.
void pbrtPixelFilter | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 788 of file api.cpp.
References RenderOptions::FilterName, RenderOptions::FilterParams, and VERIFY_OPTIONS.
void pbrtRenderer | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 830 of file api.cpp.
References RenderOptions::RendererName, RenderOptions::RendererParams, and VERIFY_OPTIONS.
void pbrtReverseOrientation | ( | ) |
Definition at line 1071 of file api.cpp.
References GraphicsState::reverseOrientation, and VERIFY_WORLD.
void pbrtRotate | ( | float | angle, | |
float | dx, | |||
float | dy, | |||
float | dz | |||
) |
Definition at line 726 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, Rotate(), and VERIFY_INITIALIZED.
void pbrtSampler | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 802 of file api.cpp.
References RenderOptions::SamplerName, RenderOptions::SamplerParams, and VERIFY_OPTIONS.
void pbrtScale | ( | float | sx, | |
float | sy, | |||
float | sz | |||
) |
Definition at line 732 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, Scale(), and VERIFY_INITIALIZED.
void pbrtShape | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 981 of file api.cpp.
References GraphicsState::areaLight, GraphicsState::areaLightParams, Assert, GraphicsState::CreateMaterial(), RenderOptions::currentInstance, TransformSet::IsAnimated(), RenderOptions::lights, TransformCache::Lookup(), MakeAreaLight(), MakeShape(), MAX_TRANSFORMS, RenderOptions::primitives, ParamSet::ReportUnused(), GraphicsState::reverseOrientation, RenderOptions::transformEndTime, RenderOptions::transformStartTime, VERIFY_WORLD, and Warning().
void pbrtSurfaceIntegrator | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 816 of file api.cpp.
References RenderOptions::SurfIntegratorName, RenderOptions::SurfIntegratorParams, and VERIFY_OPTIONS.
void pbrtTexture | ( | const string & | name, | |
const string & | type, | |||
const string & | texname, | |||
const ParamSet & | params | |||
) |
Definition at line 901 of file api.cpp.
References Error(), GraphicsState::floatTextures, Info(), MakeFloatTexture(), MakeSpectrumTexture(), GraphicsState::spectrumTextures, VERIFY_WORLD, and WARN_IF_ANIMATED_TRANSFORM.
void pbrtTransform | ( | float | tr[16] | ) |
Definition at line 706 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, and VERIFY_INITIALIZED.
void pbrtTransformBegin | ( | ) |
Definition at line 880 of file api.cpp.
References activeTransformBits, pushedActiveTransformBits, pushedTransforms, and VERIFY_WORLD.
void pbrtTransformEnd | ( | ) |
Definition at line 887 of file api.cpp.
References activeTransformBits, Error(), pushedActiveTransformBits, pushedTransforms, and VERIFY_WORLD.
void pbrtTransformTimes | ( | float | start, | |
float | end | |||
) |
Definition at line 781 of file api.cpp.
References RenderOptions::transformEndTime, RenderOptions::transformStartTime, and VERIFY_OPTIONS.
void pbrtTranslate | ( | float | dx, | |
float | dy, | |||
float | dz | |||
) |
Definition at line 699 of file api.cpp.
References FOR_ACTIVE_TRANSFORMS, Translate(), and VERIFY_INITIALIZED.
void pbrtVolume | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 1078 of file api.cpp.
References MakeVolumeRegion(), VERIFY_WORLD, RenderOptions::volumeRegions, and WARN_IF_ANIMATED_TRANSFORM.
void pbrtVolumeIntegrator | ( | const string & | name, | |
const ParamSet & | params | |||
) |
Definition at line 823 of file api.cpp.
References VERIFY_OPTIONS, RenderOptions::VolIntegratorName, and RenderOptions::VolIntegratorParams.
void pbrtWorldBegin | ( | ) |
Definition at line 846 of file api.cpp.
References activeTransformBits, ALL_TRANSFORMS_BITS, currentApiState, MAX_TRANSFORMS, namedCoordinateSystems, STATE_WORLD_BLOCK, and VERIFY_OPTIONS.
void pbrtWorldEnd | ( | ) |
Definition at line 1141 of file api.cpp.
References activeTransformBits, ALL_TRANSFORMS_BITS, TransformCache::Clear(), ImageTexture< Tmemory, Treturn >::ClearCache(), currentApiState, RenderOptions::MakeRenderer(), RenderOptions::MakeScene(), MAX_TRANSFORMS, namedCoordinateSystems, pushedGraphicsStates, pushedTransforms, Renderer::Render(), STATE_OPTIONS_BLOCK, TasksCleanup(), VERIFY_WORLD, and Warning().
int activeTransformBits = ALL_TRANSFORMS_BITS [static] |
Definition at line 268 of file api.cpp.
Referenced by pbrtActiveTransformAll(), pbrtActiveTransformEndTime(), pbrtActiveTransformStartTime(), pbrtAttributeBegin(), pbrtAttributeEnd(), pbrtTransformBegin(), pbrtTransformEnd(), pbrtWorldBegin(), and pbrtWorldEnd().
int currentApiState = STATE_UNINITIALIZED [static] |
Definition at line 266 of file api.cpp.
Referenced by pbrtCleanup(), pbrtInit(), pbrtWorldBegin(), and pbrtWorldEnd().
TransformSet curTransform [static] |
GraphicsState graphicsState [static] |
map<string, TransformSet> namedCoordinateSystems [static] |
Definition at line 269 of file api.cpp.
Referenced by pbrtCamera(), pbrtCoordinateSystem(), pbrtCoordSysTransform(), pbrtWorldBegin(), and pbrtWorldEnd().
Definition at line 126 of file api.cpp.
Referenced by CreateAdaptiveSampler(), CreateAmbientOcclusionIntegrator(), CreateBestCandidateSampler(), CreateDiffuseAreaLight(), CreateDipoleSubsurfaceIntegrator(), CreateHaltonSampler(), CreateIGISurfaceIntegrator(), CreateImageFilm(), CreateInfiniteLight(), CreateIrradianceCacheIntegrator(), CreateLowDiscrepancySampler(), CreateMetropolisRenderer(), CreatePhotonMapSurfaceIntegrator(), CreateStratifiedSampler(), CreateSurfacePointsRenderer(), ProgressReporter::Done(), EnqueueTasks(), ImageFilm::ImageFilm(), Info(), NumSystemCores(), ProgressReporter::ProgressReporter(), SurfacePointsRenderer::Render(), TasksCleanup(), TasksInit(), ProgressReporter::Update(), WaitForAllTasks(), and Warning().
vector<uint32_t> pushedActiveTransformBits [static] |
Definition at line 274 of file api.cpp.
Referenced by pbrtAttributeBegin(), pbrtAttributeEnd(), pbrtTransformBegin(), and pbrtTransformEnd().
vector<GraphicsState> pushedGraphicsStates [static] |
Definition at line 272 of file api.cpp.
Referenced by pbrtAttributeBegin(), pbrtAttributeEnd(), and pbrtWorldEnd().
vector<TransformSet> pushedTransforms [static] |
Definition at line 273 of file api.cpp.
Referenced by pbrtAttributeBegin(), pbrtAttributeEnd(), pbrtTransformBegin(), pbrtTransformEnd(), and pbrtWorldEnd().
RenderOptions* renderOptions = NULL [static] |
TransformCache transformCache [static] |