next up previous
Next: Object Attributes Up: The IVL Language Previous: Creating New IVL

Drawing IVL Objects

Once an object has been defined, it can be displayed at 0,0,0 by simply saying

draw object

This is normally (but not necessarily) done only with the first object. All other objects should be drawn relative to a previously drawn object. For example,

lostair  = Cube
histair  = Cube
draw lostair
draw histair above lostair and behind lostair

The object to draw we shall call the ``drawn object'' and the object to which the drawn object is relative to what we shall call the ``relative object.'' For the second draw command, histair is the drawn object and the lostair is the relative object. The form of any modifier is

n modifier relative-object

where the optional `` n'' indicates a distance in the direction of the modifier, with direction defined from the viewer's point-of-view using the coordinate system defined in the VRML specifications. There is only one drawn object per draw command. Multiple modifiers are combined with either an `` and'', a comma, or nothing at all in between. For example,

draw d to the left of a, above b and behind c

The following ``positional phrases'' or modifiers are available.

  1. above. Place the drawn object directly above the relative object. In other words, make the bottom of the drawn object at the same height as the top of the relative object. Notice that due to the possible existence of other modifiers, the drawn object may not physically touch the relative object.
  2. below. Make the top of the drawn object even with the bottom of the relative object.
  3. behind. Make the front of the drawn object at the same depth (into the screen) as the back of the relative object.
  4. in front of. Make the back of the drawn object at the same depth as the front of the relative object.
  5. to the left of. Make the right side of the drawn object even with the left side of the relative object. The `` the'' is optional.
  6. to the right of. Make the left side of the drawn object even with the right side of the relative object. The `` the'' is optional.

A uniform default offset can be set independently for each of these modifiers if it is desired to position objects so that the bounding boxes do not touch.



next up previous
Next: Object Attributes Up: The IVL Language Previous: Creating New IVL



Timothy F. Rohaly
Terence J. Parr
Mon Sep 11 11:59:26 EDT 1995