[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.8 INST Files

The conventional suffix for a INST file is `.inst'.

There is no INST BINARY format.

An INST applies a 4x4 transformation to another OOGL object. It begins with INST followed by these sections which may appear in any order:

 
geom oogl-object
specifies the OOGL object to be instantiated. See section 4.1.7 Embedded objects and external-object references, for the syntax of an oogl-object. The keyword unit is a synonym for geom.
 
transform   ["{"] 4x4 transform ["}"]
specifies a single transformation matrix. Either the matrix may appear literally as 16 numbers, or there may be a reference to a "transform" object, i.e.
 
    "<" file-containing-4x4-matrix
or
 
    ":" symbol-representing-transform-object>
Another way to specify the transformation is
 
transforms
    oogl-object
The oogl-object must be a TLIST object (list of transformations) object, or a LIST whose members are ultimately TLIST objects. In effect, the transforms keyword takes a collection of 4x4 matrices and replicates the geom object, making one copy for each 4x4 matrix.

If no transform nor transforms keyword appears, no transformation is applied (actually the identity is applied). You could use this for, e.g., wrapping an appearance around an externally-supplied object, though a single-membered LIST would do this more efficiently.

See section 4.1.5 Transformation matrices, for the matrix format.

Two more INST fields are accepted: location and origin.

 
location [global or camera or ndc or screen or local]
Normally an INST specifies a position relative to its parent object; the location field allows putting an object elsewhere.

location local is the default; the object is positioned relative to its parent.

 
origin [global or camera or ndc or screen or local] x y z
The origin field translates the contents of the INST to place the origin at the specified point of the given coordinate system. Unlike location, it doesn't change the orientation, only the choice of origin. Both location and origin can be used together.

So for example

 
{ INST
  location screen
  origin ndc 0 0 -.99
  geom { < xyz.vect }
  transform { 100 0 0 0  0 100 0 0  0 0 -.009 0   0 0 0 1 }
}

places xyz.vect's origin in the center of the window, just beyond the near clipping plane. The unit-length X and Y edges are scaled to be just 100 screen units -- pixels -- long, regardless of the size of the window.

4.2.8.1 INST Examples  Some example of INST Files.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Steve M. Robbins on September, 12 2004 using texi2html