. .
Next: Constructive Solid Geometry Up: Object Definition Previous: Primitives

# 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 acceleration technique or efficiency scheme) 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 end keyword. If a defined object contains no instantiations, a warning message is printed.

The most basic type of aggregate, the list, 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.

list ... end
Create a List object containing those objects instantiated between the list/end pair.

The grid 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.

grid xvox yvox zvox ... end
Create a Grid objects composed of xvox by yvox by zvox voxels containing those objects instantiated between the grid/end 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.

. .
Next: Constructive Solid Geometry Up: Object Definition Previous: Primitives

Jelle van Zeijl (jvzeijl@iso.estec.esa.nl)
Wed Jun 15 16:19:08 MET DST 1994