Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.


An instance of class GRAPHIC-RELATION contains a list of named arrays, each array belonging to class INT32-ARRAY, BIT-ARRAY or FLOAT-ARRAY. All the arrays in a graphics relation must be of the same shape -- they must have the same number of dimensions and be the same size in each dimension.

We think of an instance of GRAPHIC-RELATION as being an array of tuples. GRAPHIC-RELATIONs are the central datastructure in Skandha4. For example, a sequence of points in space is represented by a GRAPHIC-RELATION containing three FLOAT-ARRAYs named conventionally :POINT-X, :POINT-Y and :POINT-Z.

Skandha4 code assumes that any GRAPHIC-RELATION arrays named :POINT-X, :POINT-Y and :POINT-Z contain points in space, which allows us to write general functions to apply some transform to all points in a given data structure.

Similarly, the components of surface normals are conventionally kept in GRAPHIC-RELATION arrays named :POINT-NORMAL-X, :POINT-NORMAL-Y, :POINT-NORMAL-Z.

The use of such naming conventions allows Skandha4 messages to be concise, since the recipient of a GRAPHIC-RELATION simply looks inside the argument for appropriately named components, and ignores any it doesn't need.

These naming conventions also allow users to add their own arrays to existing GRAPHIC-RELATIONs without breaking existing code (which always simply ignores any unrecognized and unneeded arrays).

Go to the first, previous, next, last section, table of contents.