The pseudo code for "Atomview" is as follows:
- Initialize the Performer/Cave environment before any performer data
structures are allocated.
- A class is defined to handle the reading and the storage of commandline
arguments for use within the program.
- Read the command-line arguments.
- Start the Cave Processes.
- Setup Root-Level DCS's.
- Load up the xyz datafiles.
- Create one geometric representation per atom type.
- get a list of atom DCS's.
- For each type of atom, either load in a custom atom geometry
from disk (if it can be found and the -default flag was *not* used),
or use NewAtom() to generate a custom geometry.
- Try to load custom atoms unless explictly told otherwise.
- If all attempts to load custom atom geometries fails...create a new atom
geometry; append the new atom geometry to the list.
- For each atom, assign the proper atom geometry and location.
- Create a DCS for each atom so they can be moved independently.
- Add that DCS to the main model DCS.
- Create labels to identify the mode for the user interface.
- Set position for the label in the upper lefthand corner of the display.
- This is different depending on whether you are using a Cave, IWall, or
Idesk.
- Identify the different modes of operation for the user interface.
- Change mode of operation if any button was pressed. The four modes are:
- Scale Atoms
- Scale Model
- Navigate
- Change Time
- If middle or right button is pressed, increment mode.
- If left button is pressed, decrement mode.
- Kill all of the CAVE subprocesses and Stop CAVE when Esc is pressed.