26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RiProcedural ((RtPointer)args, mybound, RiProcDelayedReadArchive, RiProcFree);<br />

Procedural ”DelayedReadArchive” [ ”sodacan.rib” ] [ -1 1 -1 1 0 6 ]<br />

SEE ALSO<br />

RiProcDelayedReadArchive, RiProcRunProgram, RiProcDynamicLoad<br />

RiProcDelayedReadArchive ( RtPointer data, RtFloat detail )<br />

<strong>The</strong> built-in procedural RiProcDelayedReadArchive operates exactly like ReadArchive,<br />

except that the reading is delayed until the procedural primitive bounding box is<br />

reached (unlike ReadArchive, which reads RIB files immediately during parsing).<br />

<strong>The</strong> advantage of the procedural primitive is that because the reading is delayed,<br />

memory for the read primitives is not used unless (or until) the contents of the bounding<br />

box are actually needed.<br />

<strong>The</strong> data parameter consists of a pointer to an RtString array. <strong>The</strong> first element of the<br />

array (that is, ((RtString *)data)[0]) is the name of a RIB file to read.<br />

<strong>The</strong> file can contain any amount of valid RIB, although it is suggested that it either<br />

be “flat” (have no hierarchy) or have some balanced hierarchy (matching Begin-End<br />

calls). As with all RIB parameters that are bounding boxes, the boundingbox is an<br />

array of six floating-point numbers, which are xmin, xmax, ymin, ymax, zmin, zmax in<br />

the current object space.<br />

RIB BINDING<br />

Procedural ”DelayedReadArchive” [filename] [boundingbox]<br />

<strong>The</strong> argument string list contains a single string giving the filename the file to read<br />

when the contents of the boundingbox are needed.<br />

EXAMPLE<br />

RtString args[] = { ”sodacan.rib” };<br />

RtBound mybound = { -1, 1, -1, 1, 0, 6 };<br />

RiProcedural ((RtPointer)args, mybound, RiProcDelayedReadArchive, RiProcFree);<br />

Procedural ”DelayedReadArchive” [ ”sodacan.rib” ] [ -1 1 -1 1 0 6 ]<br />

SEE ALSO<br />

RiProcedural, RiProcRunProgram, RiProcDynamicLoad<br />

RiProcRunProgram ( RtPointer data, RtFloat detail )<br />

<strong>The</strong> built-in procedural RiProcRunProgram will run an external “helper program,”<br />

capturing its output and interpreting it as RIB input. <strong>The</strong> data parameter consists<br />

of a pointer to an RtString array. <strong>The</strong> first element of the array is the name of the<br />

program to run (including any command line arguments), and the second element is<br />

an argument string to be written to the standard input stream of the helper program.<br />

89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!