next up previous
Next: Executing Scripts Up: The IVL Language Previous: Animating IVL Objects

Saving the Scene Graph

The entire scene graph may be saved in either VRML 1.0 ascii or gzip-compressed VRML 1.0 ascii form. This is primarily useful as a mechanism to create new complex graphical object classes defining the parts separately and assembling the complex classes hierarchically. The form of this command is:

save as "obj.wrl"
or
gzsave as "obj.wrl.gz"

(Note that the inclusion of gzip is very important since VRML files are highly compressible in general, and since many applications are limited by the bandwidth required to download these VRML files). Scene graphs can then be read in as single object classes via:

class Obj = "obj.wrl"
a = Obj	    // make an instance
draw a      // draw the dude

Scene graphs may be written out such that their center of mass is 0,0,0 when read back in (a Transform node is added to the graph before writing it out). This is useful if the saved scene is going to be read back in as an object.



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