Changes made to HANK

We altered only a few files in HANK to make the simulator capable of stereo and multiple views. Here are the files we altered and what we did with them.

Command Line

src/sgi_visual/cmdline.C
src/sgi_visual/cmdline.h

These files process the command line options for HANK. They were exactly the same as the Perfly files, so they had not yet been customized for HANK. In HANK, the command line options are actually read into an array in the file src/master/master.C. So we changes the function processCmdline(..) to look at that array and process those values instead of trying to read them directly from the command line.

Channels

src/sgi_visual/generic.C
src/sgi_visual/generic.h

These files are where all of the channel initialization is done, so we modified them to have six different ways to initialize the various combinations of channels and views. We changed the InitChannel function so that instead of doing any actual initializing, it takes the number of channels desired and chooses the appropriate custom InitChannel function. We added Init2Channels(), Init3Channels(), Init4Channels(), Init5Channels(), and Init6Channels(). Not only do these functions initialize the channels, they set the viewports and the viewing offsets as well. We also took out some unnecessary functions in the code to streamline the processing as much as possible.



ViewState Members

src/sgi_visual/hank_visu.C
src/sgi_visual/hank_visu.h

These files contain the data members in an important structure called a SharedViewState. This structure holds all of the important information about a scene like the clipping planes, the time of day, and the stress levels. We added four variables to this struct: iocDist, paralax, stereo, amd channel. These variables adjust the intraocular distance, the convergence of the image, the stereo option on or off, and the number of channels, respectively.



How to use the options

data/cfg/README

This file was added to HANK, and lists how to set up the different new settings available in HANK. It basically just involves adding a t and a number to the end of any .cfg file.
Back to the main page.