Aggregate Objects

An aggregate is a collection of primitives, aggregate, and CSG objects. An aggregate, once defined, may be instantiated at will, which means that copies that are optionally transformed and textured may be made. If a scene calls for the presence of many geometrically identical objects, only one such object need be defined; the one defined object may then be instantiated many times.

An aggregate is one of several possible types. These aggregate types are differentiated by the type of ray/aggregate intersection algorithm (often termed an <#477#>acceleration technique<#477#> or <#478#>efficiency scheme<#478#>) that is used.

Aggregates are defined by giving a keyword that defines the type of the aggregate, followed by a series of object instantiations and surface definitions, and terminated using the <#479#>end<#479#> keyword. If a defined object contains no instantiations, a warning message is printed.

The most basic type of aggregate, the <#480#>list<#480#>, performs intersection testing in the simplest possible way: Each object in the list is tested for intersection with the ray in turn, and the closest intersection is returned.

<#4874#><#4874#>
<#1362#>list<#1362#> ...<#1363#>end<#1363#>
Create a List object containing those objects instantiated between the <#484#>list<#484#>/<#485#>end<#485#> pair.

The <#487#>grid<#487#> aggregate divides the region of space it occupies into a number of discrete box-shaped voxels. Each of these voxels contains a list of the objects that intersect the voxel. This discretization makes it possible to restrict the objects tested for intersection to those that are likely to hit the ray, and to test the objects in nearly ``closest-first'' order.

<#4875#><#4875#>
<#1366#>grid<#1366#> <#1367#>xvox yvox zvox<#1367#> ...<#1368#>end<#1368#>
Create a Grid objects composed of <#492#>xvox<#492#> by <#493#>yvox<#493#> by <#494#>zvox<#494#> voxels containing those objects instantiated between the <#495#>grid<#495#>/<#496#>end<#496#> pair.
It is usually only worthwhile to ``engrid'' rather large, complex collections of objects. Grids also use a great deal more memory than List objects.