read-directive ( keyword -- directive )


Vocabulary
pbrt.private

Inputs
keywordan object


Outputs
directivean object


Definition


: read-directive ( keyword -- directive )
{
{ "Camera" [ read-typed-params pbrt-camera boa ] }
{ "Film" [ read-typed-params pbrt-film boa ] }
{ "Sampler" [ read-typed-params pbrt-sampler boa ] }
{
"Integrator"
[ read-typed-params pbrt-integrator boa ]
}
{
"Accelerator"
[ read-typed-params pbrt-accelerator boa ]
}
{
"PixelFilter"
[ read-typed-params pbrt-pixel-filter boa ]
}
{ "Shape" [ read-typed-params pbrt-shape boa ] }
{ "Material" [ read-typed-params pbrt-material boa ] }
{
"LightSource"
[ read-typed-params pbrt-light-source boa ]
}
{
"AreaLightSource"
[ read-typed-params pbrt-area-light boa ]
}
{
"Texture"
[
next-token next-token next-token read-params
pbrt-texture boa
]
}
{
"MakeNamedMaterial"
[ next-token read-params pbrt-named-material boa ]
}
{ "NamedMaterial" [ next-token pbrt-use-material boa ] }
{
"MakeNamedMedium"
[
next-token read-params pbrt-make-named-medium
boa
]
}
{
"MediumInterface"
[ next-token next-token pbrt-medium-interface boa ]
}
{ "WorldBegin" [ pbrt-world-begin boa ] }
{ "WorldEnd" [ pbrt-world-end boa ] }
{ "AttributeBegin" [ pbrt-attribute-begin boa ] }
{ "AttributeEnd" [ pbrt-attribute-end boa ] }
{ "TransformBegin" [ pbrt-transform-begin boa ] }
{ "TransformEnd" [ pbrt-transform-end boa ] }
{
"ReverseOrientation"
[ pbrt-reverse-orientation boa ]
}
{ "Identity" [ pbrt-identity boa ] }
{
"Translate"
[ 3 read-n-numbers first3 pbrt-translate boa ]
}
{ "Scale" [ 3 read-n-numbers first3 pbrt-scale boa ] }
{ "Rotate" [ 4 read-n-numbers first4 pbrt-rotate boa ] }
{
"LookAt"
[ 9 read-n-numbers 9 firstn pbrt-look-at boa ]
}
{
"Transform"
[
next-token open-bracket?
[ "Expected [" pbrt-parse-error ] unless
read-bracketed-values pbrt-transform boa
]
}
{
"ConcatTransform"
[
next-token open-bracket?
[ "Expected [" pbrt-parse-error ] unless
read-bracketed-values pbrt-concat-transform boa
]
}
{
"CoordinateSystem"
[ next-token pbrt-coordinate-system boa ]
}
{
"CoordSysTransform"
[ next-token pbrt-coord-sys-transform boa ]
}
{ "Include" [ next-token pbrt-include boa ] }
{ "ObjectBegin" [ next-token pbrt-object-begin boa ] }
{ "ObjectEnd" [ pbrt-object-end boa ] }
{
"ObjectInstance"
[ next-token pbrt-object-instance boa ]
}
{ "Option" [ read-typed-params pbrt-option boa ] }
{ "ColorSpace" [ next-token pbrt-color-space boa ] }
{
"TransformTimes"
[ 2 read-n-numbers first2 pbrt-transform-times boa ]
}
{
"ActiveTransform"
[ next-token pbrt-active-transform boa ]
}
{ "Import" [ next-token pbrt-import boa ] }
{
"Attribute"
[ next-token read-params pbrt-attribute boa ]
}
[ "Unknown directive: " prepend pbrt-parse-error ]
} case ;