WorldToolKit is a library of C language functions developed by the Sense8 Division of Engineering Animations Inc. for the development of virtual reality programs. This document describes how to create and run a basic WTK application using the resources of the Computer Aided Engineering Network at the University of Michigan. For more complete information, see also:
All three of these manuals are available on-line in PDF format ( see below. ) The first two are also available in paper form at the Media Union reserve desk. The third guide is platform dependant, and is available for each of the hardware platforms supported at the University of Michigan ( Windows NT/95/98, SGI, Sun )
The linked makefile will make an executable WTK application from a source file ending in ".c". For example, to create the executable "bareVR" from a source file "bareVR.c", type
make bareVR
It is also necessary to set three environment variables, WTKCODES, WTMODELS, and WTIMAGES. For example:
setenv WTKCODES /disk1/wtk
setenv WTMODELS /disk1/wtk/models
setenv WTIMAGES /disk1/wtk/images
Note, that the first of these variables begins with "WTK", and the other two with "WT" ( no K ).
The PATH environment variable on these machines does not normally include the current directory, so in order to run the resulting executable, it is necessary to preface the program name with "./", i.e. "./bareVR".
You may wish to edit your ".login" or ".cshrc" files to set the WT environment variables, and possibly also the PATH variable.
Note: As of 28 September 1999, WTK is only loaded on Indigos 1, 2, 4, and 5, and on Aegaeon. WTK eventually should be on all the SGIs in the VR Lab.
Navigation in virtual worlds is a basic skill that seems to cause many people difficulty. Many people would like to simply point to where they want to go and have the computer move them there. Unfortunately there are several reasons why the default WTK navigation does not work that way.
Instead, all motion is done with the mouse, based upon the position of the mouse cursor relative to the center of the screen. The amount of movement is related to the distance from the center - there is no motion when the mouse is in the center, and increasing amounts as the mouse is moved away from center. The results of pressing different mouse buttons in different parts of the screen are shown in the following diagram and table:
With the mouse |
|
||
the left mouse button |
the right mouse button |
both mouse buttons |
|
in the center. |
does nothing |
does nothing |
does nothing |
at the top. |
moves forward |
slides up ( towards ceiling. ) |
tilts view up. |
at the bottom. |
moves backwards |
slides down ( towards floor. ) |
tilts view down. |
to the left. |
turns to the left |
slides to the left |
tilts clockwise |
to the right. |
turns to the right |
slides to the right |
tilts counterclockwise |
The WorldToolKit Installation and Hardware Guide provides information on the libraries and options required for more advanced programs, such as those involving MFC or GUI interfaces.