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.

XVRML-SAVE-VRML-FILE

source files: xvrml.[ch], xvrml.lsp

SYNTAX

(XVRML-SAVE-VRML-FILE 
    "myfile.wrl" <thinglist>
      [:VERSION  { :VRML1 | :VRML97 } ]
      [:REVERSE-Z t] 
      [:TITLE <string>]
      [:CAMERA { <cmr> | '( ... ) } ]
      [:HEADLIGHT { NIL | t } ]
      [:SKY-COLOR { <color> | '( ...) } ]
      [:SKY-ANGLE { <angle> | '( ...) } ]
      [:GROUND-COLOR { <color> | '( ...) } ]
      [:GROUND-ANGLE { <angle> | '( ...) } ]
)

DESCRIPTION

This call will save a Skandha thinglist in VRML format. The :VERSION keyword can be used to specify whether VRML 1.0 or VRML97 format should be used. The default setting is :VRML97. Two points of note:

If :REVERSE-Z is true, then the saved VRML file will be a mirrored version of the thinglist, relative to the Z-axis. (This is the default, since Skandha uses a left-handed coordinate system, whereas VRML -- and most other graphics systems -- use a right-handed coordinate system.)

A title for the scene can be specified with the :TITLE keyword.

Viewpoints for the scene can be specified by providing a camera (or a list of cameras) with the :CAMERA keyword. A name for each view can be specified by attaching a :DESCRIPTION property to the camera's property list. (Otherwise default names such as "View 1", View 2", etc. will be used.)

The :HEADLIGHT keyword controls whether the light attached to the VRML viewer's camera is turned on or off by default. This defaults to NIL.

The SKY/GROUND settings allow you to control the background of the VRML world. To just set a background color, use :SKY-COLOR followed by a three-element list of RGB values. More complex behavior (such as color gradations) can be achieved by specifying additional values. Consult VRML97 documentation for the Background node for details. (One current source is www.vrml.org.)


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